function Rectangle(const rec: TRect): TPathD; overload;
function Rectangle(const rec: TRectD): TPathD; overload;
function Rectangle(l, t, r, b: double): TPathD; overload;
This function returns the points representing the rectangle's 4 corners: top-left, top-right, bottom-right & bottom-left (in that order).
uses Img32, Img32.Fmt.PNG, Img32.Vector, Img32.Transform; ... var img: TImage32; dst: TPathD; begin img := TImage32.Create; img.LoadFromFile('clouds.png'); //setup the transformation geometry dst := Rectangle(src.Bounds); dst[0].Y := 20; dst[3].Y := img.Height-20; //transform and save ProjectiveTransform(img, dst); img.SaveToFile('clouds_proj.png'); img.Free; end;
Copyright ©2010-2023 Angus Johnson - Image32 4.8 - Help file built on 17 Jan 2025