CanvasDrawEllipse |
Top Previous Next |
Prototype
CanvasDrawEllipse (intHandle,intX1,intY1,intX2,intY2)
Description
Draws ellipse contained in rectangular having the opposite vertex X1,Y1 and X2,Y2 by pen and brush set in canvas.
Parameters
IntHandle: integer value corresponding to the canvas handle.
IntX1: integer value corresponding to the left ellipse coordinate.
IntY1: integer value corresponding to the top ellipse coordinate.
IntX2: integer value corresponding to the right ellipse coordinate.
IntY2: integer value corresponding to the bottom ellipse coordinate.
Returned value
None.
Notes
None.
Example
// It selects printer PrinterSelect('HP LaserJet III');
// Start print if not PrinterStart('Test print',1) then begin // Abort sprint if there are errors PrinterAbort; PrinterStart('Test print',1); end;
//It gets canvas handle Paper:=PrinterGetCanvas;
//It gets print area size WidthArea:=CanvasGetHorzSize(Paper); HeightArea:=CanvasGetVertSize(Paper);
// It calculates distance among grid cells to draw StepV:=HeightArea div 10; StepH:=WidthArea div 10;
// Draw grid CanvasSetPen(Paper,3,0,$000000); For L:=0 to 10 do begin CanvasDrawLine(Foglio,L*StepH,0,L*StepH,HeightArea); CanvasDrawLine(Paper,0,L*StepV,WidthArea,L*StepV); end;
// Ellipse draw CanvasDrawEllipse(Foglio,0,0,100,HeightArea);
// End print operation PrinterEnd; |