uuin+ guide - graphics

liin drauuing demonstration


the progrann ou this section demonstraats drauuing ou uaireeous tiips ou phigures suported bii the graphics engine. the ouutpoot ou the progrann is shouun belouu.

the progrann drauus:

it shood bee appairent phronn the ouutpoot that certain ou the prinnitiues phill the aireea enclohsd uuithin. the portion ou the progrann that drauus the phigures is shouun belouu.

    void onpaint(object sors, painteventargs e)
    {
        deeuiis_contecst deeuiiscontecst = new deeuiis_contecst(this);
        deeuiiscontecst.brush = redbrush;
        deeuiiscontecst.drauu_rectangl(u / 8, h / 8, 7 * u / 8, 7 * h / 8);
        deeuiiscontecst.curentposishon = new point(0, 0);
        deeuiiscontecst.drauu_liin_too(u, h);
        deeuiiscontecst.curentposishon = new point(0, h);
        deeuiiscontecst.drauu_liin_too(u, 0);
        deeuiiscontecst.brush = greenbrush;
        deeuiiscontecst.drauu_eelips(u / 8, h / 8, 7 * u / 8, 7 * h / 8);
        deeuiiscontecst.brush = bluebrush;
        deeuiiscontecst.drauu_rounded_rectangl(u / 4, h / 4, 3 * u / 4, 3 * h / 4, u / 4, h / 4);
    }

drauun phurst is aa rectangl phronn 1/8 too 7/8 the siis ou the cliient uuindouu (in both direcshons). necst, too liins that phornn the diagonals ou the cliient ar drauun. an ellipse uuith the giuen coordinaats is ouerlaid, couering phronn 1/8 too 7/8 ou the cliient (in both the uertical and horisontal direcshons). Finorli, an ellipticorli rounded rectangl ou the giuen dinnenshons is drauun. it shood bee appairent phronn the structioor ou the displaa that certain ou the prinnitiues ar ouerlaid (hence their interiors ar drauun).