Home | GR32 | TBitmap32 |
TBitmap32.Line
procedure Line(X1, Y1, X2, Y2: Integer; Value: TColor32; L: Boolean = False);
procedure LineS(X1, Y1, X2, Y2: Integer; Value: TColor32; L: Boolean = False);
procedure LineT(X1, Y1, X2, Y2: Integer; Value: TColor32; L: Boolean = False);
procedure LineTS(X1, Y1, X2, Y2: Integer; Value: TColor32; L: Boolean = False);
procedure LineA(X1, Y1, X2, Y2: Integer; Value: TColor32; L: Boolean = False);
procedure LineAS(X1, Y1, X2, Y2: Integer; Value: TColor32; L: Boolean = False);
procedure LineX(X1, Y1, X2, Y2: TFixed; Value: TColor32; L: Boolean = False);
procedure LineXS(X1, Y1, X2, Y2: TFixed; Value: TColor32; L: Boolean = False);
procedure LineF(X1, Y1, X2, Y2: Single; Value: TColor32; L: Boolean = False);
procedure LineFS(X1, Y1, X2, Y2: Single; Value: TColor32; L: Boolean = False);
procedure LineXP(X1, Y1, X2, Y2: Single; L: Boolean = False);
procedure LineXSP(X1, Y1, X2, Y2: Single; L: Boolean = False);
procedure LineFP(X1, Y1, X2, Y2: Single; L: Boolean = False);
procedure LineFSP(X1, Y1, X2, Y2: Single; L: Boolean = False);
Description
Draws a line from (X1,Y1) to (X2,Y2). Methods with 'S' postfix perform necessary pixel-perfect clipping to a bitmap boundary or clipping rectangle.
LineA and LineAS use modified versions of Bresenham’s algorithm (also known as Wu’s antialiasing), modified to support line transparency and pixel shape/gamma correction.
LineX/F/XS/FS functions use my own algorithm for antialiasing. Line ends have fixed- or floating-point coordinates. These methods work approximately 2–2.5 times slower than LineA and LineAS.
The last optional parameter (L) determines if the last point (X2,Y2) has to be drawn. It is useful in some cases to leave that point empty, especially when drawing sequences of transparent and/or antialiased lines. By default, Line methods don’t render the last point.
LineXP/FP/XSP/FXP draw antialiased lines with support for color patterns.
See Also
HorzLine, LineTo, MoveTo, Naming Conventions, TColor32, VertLine
Copyright ©2000-2007 Alex Denisov and Contributors - Graphics32 v1.8.3 - Build on 4-March-2007