PIE() Example Project of Clarion's Draw a Pie Chart

One thing I learned is you can SetTarget() to an IMAGE control which limits Graphics Draw commands to that rectangle. E.g. a BLANK command only erases within that Image boundry. It makes all the Draw (X,Y) relative to the Image AT(X,Y) i.e. BOX(0,0) draws at the Image (X,Y).

For that to work it must be SetTarget(Window, ?Image) or SetTarget(Report, ?Image). It does not work as SetTarget(, ?Image) without the Target Window/Report.

You can also SetTarget(Report, ?BandFEQ) which I used with SetPenStyle() and LINE() for Dashed or Dotted lines on a Report.

The Help since C4 no longer splits out the Graphics procedures into their own section, now they are mixed in with all the commands which makes it hard to quickly grasp them all. I think this is the list:

 BLANK    (<SIGNED x>, <SIGNED y>, <SIGNED width>, <SIGNED height>),NAME('Cla$BLANK')

 ARC      (SIGNED x, SIGNED y, SIGNED width, SIGNED height, SIGNED startAngle, SIGNED endAngle, <STRING attributeList>),NAME('Cla$ARC')
 BOX      (SIGNED x, SIGNED y, SIGNED width, SIGNED height, LONG fill=COLOR:None, <STRING attributeList>),NAME('Cla$BOX')
 CHORD    (SIGNED x, SIGNED y, SIGNED width, SIGNED height, SIGNED startAngle, SIGNED endAngle, LONG fill=COLOR:None, <STRING attributeList>),NAME('Cla$CHORD')
 ELLIPSE  (SIGNED x, SIGNED y, SIGNED width, SIGNED height, LONG fill=COLOR:None, <STRING attributeList>),NAME('Cla$ELLIPSE')
 IMAGE    (SIGNED x, SIGNED y, SIGNED width=0, SIGNED height=0, STRING fileName, <STRING attributeList>),NAME('Cla$IMAGE')
 LINE     (SIGNED x, SIGNED y, SIGNED width, SIGNED height, <STRING attributeList>),NAME('Cla$LINE')
 PIE      (SIGNED x, SIGNED y, SIGNED width, SIGNED height, *SIGNED[] slices, *LONG[] colors, SIGNED depth=0, UNSIGNED wholeValue=0, SIGNED startAngle=0, <STRING attributeList>),NAME('Cla$PIE')
 POLYGON  (*SIGNED[] XY_Array, LONG fill=COLOR:None, <STRING attributeList>),NAME('Cla$POLYGON')
 ROUNDBOX (SIGNED x, SIGNED y, SIGNED width, SIGNED height, LONG fill=COLOR:None, <STRING attributeList>),NAME('Cla$ROUNDBOX')
 SHOW     (SIGNED x, SIGNED y, STRING str, <STRING attributeList>),NAME('Cla$SHOW')  !The font used is the current font for the window or report.
 TYPE     (STRING str),NAME('Cla$StackTYPE')    !Writes a string to the current window or report.
      
 PENCOLOR(),SIGNED,NAME('Cla$PENCOLOR')
 PENWIDTH(),SIGNED,NAME('Cla$PENWIDTH')
 PENSTYLE(),SIGNED,NAME('Cla$PENSTYLE')
 SETPENWIDTH(SIGNED width=0),NAME('Cla$SETPENWIDTH')
 SETPENSTYLE(SIGNED style=PEN:Solid),NAME('Cla$SETPENSTYLE')
 SETPENCOLOR(SIGNED color=COLOR:WindowText),NAME('Cla$SETPENCOLOR')
 SETTARGET(<WINDOW target>, UNSIGNED band=0),NAME('Cla$SETTARGET') !The control number or field equate label of the REPORT band (or IMAGE control in a window target) to draw graphics primitives to (ARC, CHORD, etc.)     

For writing Text the SHOW() and TYPE() commands seem lame that they write using the Window Font. I did a quick test of changing that font and it did not affect Show.

For Text what I would do is CREATE() String controls so you can set Font and every attribute. To allow a way to Blank() use a Group you CREATE() and make that the Parent control CREATE(,Create:String,GroupFEQ). Then if you DESTROY(GroupFEQ) it also destroys all the Child controls.