
PowerDoc Objects
Arc
Overview
This object represents an open arc. In Power Engine API, this is simply a section of a circle or an ellipse.
While constructing the Arc object, an optional shadow may be specified. Also, depending on the pdLinePtr link, arcs can be drawn solid or dashed, while their ends can be styled (flat, rounded, peak).
Designated Rendering Function: pdDrawArc (2)
Tip: A closed arc can be constructed using the Slice object.
Links
pdShadowPtr (1016)
Also appears in: Typography (For Outline Fonts), Baseline, Row Boundary, Typographic Frame, Library Polyline, Library Shape, Line, Rectangle, Circle/Ellipse, True Circle/Ellipse, Slice, Grid, Custom Shape or Polygon, Polyline (also Bezier and B-Spline curve)
Link to the Shadow Definition object.
Used to render the shadow of a line, shape or some other object.
Properties
pdRadiusHor (1035) PD_LONG_SIGNED
Also appears in: True Circle/Ellipse, Slice
Horizontal radius in document units. Must be positive.
Sample values:
500 = Horizontal radius of 500 document units
800 = Horizontal radius of 800 document units
pdRadiusVer (1036) PD_LONG_SIGNED
Also appears in: True Circle/Ellipse, Slice
Vertical radius in document units. Must be positive.
Sample values:
500 = Vertical radius of 500 document units
800 = Vertical radius of 800 document units
pdAngleAlpha (1032) PD_WORD_UNSIGNED
Also appears in: Text Arc, Rich Text Arc, Slice
Initial (start) angle in degrees. Must be between 0 and 360.
Sample values:
0 = Angle of 0 degrees
90 = Angle of 90 degrees
pdAngleTheta (1037) PD_WORD_SIGNED
Also appears in: Slice
Length of an arc in degrees. Must be between 0 and 360.
Sample values:
180 = Length of 180 degrees
240 = Length of 240 degrees
Example
C/C++
DT_ID_SLONG obj[5];
obj[0] = pdObjAdd(pd, 0, "Arc Style");
obj[1] = pdObjAdd(pd, 0, "Arc Shadow Style");
obj[2] = pdObjAdd(pd, 0, "Arc Line Definition");
obj[3] = pdObjAdd(pd, 0, "Arc Shadow");
obj[4] = pdObjAdd(pd, 0, "Arc");
pdPropAdd(pd, obj[0], pdRGBT, "50641400", PD_HEX);
pdPropAdd(pd, obj[1], pdRGBT, "80808078", PD_HEX);
pdLinkAdd(pd, obj[2], pdStylePtr, obj[0]);
pdPropAdd(pd, obj[2], pdLineThickness, "240", PD_WORD_SIGNED);
pdLinkAdd(pd, obj[3], pdStylePtr, obj[1]);
pdPropAdd(pd, obj[3], pdShadowDx, "5", PD_WORD_SIGNED);
pdPropAdd(pd, obj[3], pdShadowDy, "5", PD_WORD_SIGNED);
pdLinkAdd(pd, obj[4], pdLinePtr, obj[2]);
pdLinkAdd(pd, obj[4], pdShadowPtr, obj[3]);
pdPropAdd(pd, obj[4], pdRadiusHor, "150", PD_LONG_SIGNED);
pdPropAdd(pd, obj[4], pdRadiusVer, "150", PD_LONG_SIGNED);
pdPropAdd(pd, obj[4], pdAngleAlpha, "210", PD_WORD_UNSIGNED);
pdPropAdd(pd, obj[4], pdAngleTheta, "120", PD_WORD_SIGNED);
pdImgAdd(pd, obj[4], 0, 250, 250, 0, 0, 0, pdDrawArc, DV_NULL);
INTEGRAL DSL
local o = @(label = "") CDTObj(::my.doc, label);
local p = @(id, str, len = PD_DEFAULT) CDTProp(id, str, len);
local s = @(id, str) CDTPropStr(id, str);
local i = @(id, num) CDTPropInt(id, num);
local l = @(id, obj) CDTLink(id, obj);
local obj_0 = o("Arc Style");
local obj_1 = o("Arc Shadow Style");
local obj_2 = o("Arc Line Definition");
local obj_3 = o("Arc Shadow");
local obj_4 = o("Arc");
obj_0 + s(pdRGBT, "50641400");
obj_1 + s(pdRGBT, "80808078");
obj_2 + l(pdStylePtr, obj_0);
obj_2 + i(pdLineThickness, 240);
obj_3 + l(pdStylePtr, obj_1);
obj_3 + i(pdShadowDx, 5);
obj_3 + i(pdShadowDy, 5);
obj_4 + l(pdLinePtr, obj_2);
obj_4 + l(pdShadowPtr, obj_3);
obj_4 + i(pdRadiusHor, 150);
obj_4 + i(pdRadiusVer, 150);
obj_4 + i(pdAngleAlpha, 210);
obj_4 + i(pdAngleTheta, 120);
obj_4.Pin(0, 250, 250, pdDrawArc);
