Older Newer
Wed, 22 Dec 2021 03:52:56 . . . . SyneRyder [Initial function definition]


Changes by last author:

Added:
= setEllipseFill =

== Syntax ==

bool setEllipseFill(int left, int top, int right, int bottom, int color)

== Arguments ==

:left

::Left-most bound of the ellipse, in pixels.

:top

::Top-most bound of the ellipse, in pixels.

:right

::Right-most bound of the ellipse, in pixels.

:bottom

::Bottom-most bound of the ellipse, in pixels.

:color

::Color value for the ellipse.

== Returns ==

True if the function succeeded, false otherwise

== Description ==

Render an ellipse or circle filled with the given color to an OWNERDRAW control.

== Example ==

<code>

%fml

ctl(1): OWNERDRAW(drawitem), Pos=(300,50), Size=(100, 100)

OnFilterStart: {

// Maximum X/Y pixel co-ords of ownerdraw

int maxxpixel = HDBUsToPixels(100)-1;

int maxYpixel = VDBUsToPixels(100)-1;

// Start using setPixel drawing on OWNERDRAW control 1

startSetPixel(1);

// Draw rectangle around OWNERDRAW area

setRectFrame(0, 0, maxxpixel, maxYpixel, RGB(0,0,0));

// Draw a filled red ellipse

setEllipseFill(5, 5, 200, 150, RGB(255, 0, 0));

// Draw a blue circle

setEllipse(25, 50, 150, 175, RGB(0, 0, 255));

// Stop using setPixel drawing

endSetPixel(1);

return true;

}

</code>

== See Also ==

OWNERDRAW, startSetPixel, setEllipse, setRectFrame, endSetPixel