setAngleArc

Syntax

bool setAngleArc(int x, int y, int radius, int a, int b, int color)

Arguments

x
Horizontal x-coordinate of the center of the pie / circle, in pixels.
y
Vertical y-coordinate of the center of the pie / circle, in pixels.
radius
Radius of the arc, in pixels.
a
Start angle of the arc
b
Ending angle of the arc
color
Color value of the outlined arc piece.

Returns

True if the function succeeded, false otherwise

Description

Render the outline of an arc-shape to an OWNERDRAW control.

Example

%fml
Title: "Wakka Wakka Outline"

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 a black / blue background gradient
  setRectGradient(0, 0, maxxpixel, maxYpixel, RGB(0, 0, 0), RGB(0, 0, 255), false);

  // Draw a round pill-colored circle
  setEllipseFill(180, 115, 230, 165, RGB(255, 255, 192));

  // Draw an outline of a yellow arc-shaped
  // character who says wakka wakka wakka
  setAngleArc(140, 140, 100, 3.1415 * 2.0 * 37.5 / 100.0, 3.1415 * 2.0 * 12.5 / 100.0, RGB(255,255,0));

  // Stop using setPixel drawing
  endSetPixel(1);

  return true;
}

See Also

OWNERDRAW, startSetPixel, setAngleArcFill, setEllipseFill, setFill, setRectFrame, endSetPixel