procedure DrawLine(img: TImage32; const line: TPathD; lineWidth: double; color: TColor32; endStyle: TEndStyle; joinStyle: TJoinStyle = jsAuto; miterLimit: double = 2); overload;
procedure DrawLine(img: TImage32; const line: TPathD; lineWidth: double; renderer: TCustomRenderer; endStyle: TEndStyle; joinStyle: TJoinStyle = jsAuto; miterLimit: double = 2); overload;
procedure DrawLine(img: TImage32; const lines: TPathsD; lineWidth: double; color: TColor32; endStyle: TEndStyle; joinStyle: TJoinStyle = jsAuto; miterLimit: double = 2); overload;
procedure DrawLine(img: TImage32; const lines: TPathsD; lineWidth: double; renderer: TCustomRenderer; endStyle: TEndStyle; joinStyle: TJoinStyle = jsAuto; miterLimit: double = 2); overload;
EndStyle

JoinStyle

uses Img32, Img32.Fmt.PNG, Img32.vector, Img32.Draw;
...
var
img: TImage32;
path, path2: TPathD;
rec: TRect;
const
nPoints = 5; //must be an odd number
npDiv2 = nPoints div 2;
begin
img := TImage32.Create(256,256);
rec := img.Bounds;
Windows.InflateRect(rec, -10,-10);
//create N pointed star
path := Ellipse(rec, nPoints);
SetLength(path2, nPoints);
for i := 0 to nPoints -1 do
path2[i] := path[((i* npDiv2) mod nPoints)];
//draw the line
DrawLine(img, path2, 5, clNavy32, esPolygon);
img.SaveToFile('line1.png');
img.Free;
end;
uses Img32, Img32.Fmt.PNG, Img32.vector, Img32.Draw;
...
var
img: TImage32;
path, path2: TPathD;
rec: TRect;
begin
img := TImage32.Create(256,256);
rec := img.Bounds;
Windows.InflateRect(rec, -30,-10);
Windows.OffsetRect(rec, 0, 60);
with rec do //construct a bezier curve
path := FlattenCBezier(
PointD(left, top), PointD(left, bottom),
PointD(right, bottom), PointD(right, top));
//draw the bezier curve
DrawLine(img, path, 10, clMaroon32, esRound);
img.SaveToFile('line2.png');
img.Free;
end;
uses Img32, Img32.Fmt.PNG, Img32.vector, Img32.Draw;
...
var
img: TImage32;
imageRender: TImageRenderer;
path, path2: TPathD;
rec: TRect;
const
nPoints = 5; //must be an odd number
npDiv2 = nPoints div 2;
begin
img := TImage32.Create(256, 256);
rec := img.Bounds;
Windows.InflateRect(rec, -10,-10);
//create N pointed star
path := Ellipse(rec, nPoints);
SetLength(path2, nPoints);
for i := 0 to nPoints -1 do
path2[i] := path[((i* npDiv2) mod nPoints)];
imageRender := TImageRenderer.Create;
imageRender.Image.LoadFromResource('TILE', 'BMP');
imageRender.Image.Resize(10, 10);
DrawLine(img, path2, 10, imageRender, esPolygon);
imageRender.Free;
img.SaveToFile('line3.png');
img.Free;
end;
Copyright ©2010-2023 Angus Johnson - Image32 4.8 - Help file built on 16 Apr 2025