Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/lib_ref/pg/pgdrawellipse.html on line 1

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/lib_ref/pg/pgdrawellipse.html on line 1

Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/lib_ref/pg/pgdrawellipse.html on line 8

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/lib_ref/pg/pgdrawellipse.html on line 8

PgDrawEllipse(), PgDrawEllipseCx()

Draw an ellipse

Synopsis:

int PgDrawEllipse( PhPoint_t const *center,
                   PhPoint_t const *radii,
                   unsigned int flags );

int PgDrawEllipseCx( void *dc,
                     PhPoint_t const *center,
                     PhPoint_t const *radii,
                     unsigned int flags );

Arguments:

dc
PgDrawEllipseCx() only. A void pointer to any type of draw context. Examples of draw contexts are:
center
Defines the ellipse's center.
radii
Defines the ellipse's x and y radii.
flags
Must be one of the following:

To have the function interpret the center and radii arguments as the upper-left and lower-right coordinates respectively, OR flags with Pg_EXTENT_BASED.

Library:

ph

Description:

These functions build a command in the draw buffer to draw an ellipse. PgDrawEllipse() works on the current draw context, while you can specify the draw context for PgDrawEllipseCx().

Returns:

0
Success.
-1
The draw buffer is too small to hold the current draw state and the draw command.

Examples:

The following example:

DrawStrokeElli() {
    PhPoint_t   c = { 80, 60 };
    PhPoint_t   r = { 72, 52 };

    PgSetStrokeColor( Pg_WHITE );
    PgDrawEllipse( &c, &r, Pg_DRAW_STROKE );
}

will draw:

PgDrawEllipse,stroke

The following example:

DrawFillElli() {
    PhPoint_t   c = { 80, 60 };
    PhPoint_t   r = { 72, 52 };

    PgSetFillColor( Pg_PURPLE );
    PgDrawEllipse( &c, &r, Pg_DRAW_FILL );
}

will draw:

PgDrawEllipse,fill

The following example:

DrawFillStrokeElli() {
    PhPoint_t   c = { 80, 60 };
    PhPoint_t   r = { 72, 52 };

    PgSetFillColor( Pg_PURPLE );
    PgSetStrokeColor( Pg_WHITE );

    PgDrawEllipse( &c, &r, Pg_DRAW_FILL_STROKE );
}

will draw:

PgDrawEllipse,fillstroke

Classification:

Photon

Safety:
Interrupt handler No
Signal handler No
Thread No

See also:

PgDrawRoundRect*(), PgSetFillColor*(), PgSetFillDither*(), PgSetFillTransPat*(), PgSetStrokeColor*(), PgSetStrokeDither*(), PgSetStrokeTransPat*(), PhPoint_t

Arcs, ellipses, polygons, and rectangles in the Raw Drawing and Animation chapter of the Photon Programmer's Guide


Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/lib_ref/pg/pgdrawellipse.html on line 239

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/lib_ref/pg/pgdrawellipse.html on line 239