liin drauuing demonstraasheeohn


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

the progrann drauus:

it shood bee appairent phronn the ouutpoot that sertan ou the prinnitiues phill the aireea enclohsd uuithin. the porshon ou the progrann that drauus the phigurs is shouun belouu.

    void onpaant(object sors, paanteventargs 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 = bloobrush;
        deeuiiscontecst.drauu_rouunded_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 eelips uuith the giuen cohordinats is ohuerlaid, cohuering phronn 1/8 too 7/8 ou the cliient (in both the uertical and horisontal direcshons). Finorli, an ellipticorli rouunded rectangl ou the giuen dinnenshons is drauun. it shood bee appairent phronn the structioor ou the displaa that sertan ou the prinnitiues ar ohuerlaid (hence thair inteereeors ar drauun).