[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] Reference for unit 'fpg_base' (#fpgui)

TfpgCanvasBase.DrawLineClipped

Draws a line inside a clip rectangle

Declaration

Source position: fpg_base.pas line 383

public procedure TfpgCanvasBase.DrawLineClipped(

  var x1: TfpgCoord;

  var y1: TfpgCoord;

  var x2: TfpgCoord;

  var y2: TfpgCoord;

  const AClipRect: TfpgRect

);

Description

Draws a line inside a clip rectangle. This procedure clips a line to the AClipRect boundaries and then calls the DrawLine procedure with the clipped coordinates. If the line lies completely outside of the clip boundary, then the Line routine is not called. This procedure uses the well known Cohen-Sutherland line clipping algorithm to clip each coordinate.

Use this if you do not want to change the Canvas.ClipRegion for some reason. For a detailed explanation see: http://www.nondot.org/~sabre/graphpro/line6.html


Documentation generated on: 2013-04-29