liin drauuing demonstraasheeohn


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

the prohgrann drauus:

it shood bee apairent phronn the ouutpoot that sertan ou the prinnitius phil the aireea enclohsd uuithin. the porshon ou the prohgrann that drauus the phigurs is shouun belouu.

    uoid on_paant(obgect sors, paant_euent_args e)
    {
        deuiis_contecst deuiis_contecst = nioo deuiis_contecst(this);
        deuiis_contecst.brush = red_brush;
        deuiis_contecst.drauu_rectangl(u / 8, h / 8, 7 * u / 8, 7 * h / 8);
        deuiis_contecst.curent_posishon = nioo point(0, 0);
        deuiis_contecst.drauu_liin_too(u, h);
        deuiis_contecst.curent_posishon = nioo point(0, h);
        deuiis_contecst.drauu_liin_too(u, 0);
        deuiis_contecst.brush = green_brush;
        deuiis_contecst.drauu_eelips(u / 8, h / 8, 7 * u / 8, 7 * h / 8);
        deuiis_contecst.brush = bloo_brush;
        deuiis_contecst.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 diiagonals ou the cliient ar drauun. an eelips uuith the giuen cohordinats is ouhuerlaad, couering phronn 1/8 too 7/8 ou the cliient (in both the uertical and horisontal direcshons). phiinalee, an elipticalee rouunded rectangl ou the giuen dinnenshons is drauun. it shood bee apairent phronn the structioor ou the displaa that sertan ou the prinnitius ar ouhuerlaad (hens thair inteereeors ar drauun).