Method function IGDIPlus.IGPGraphicsPath.AddBezier(TGPPoint;TGPPoint;TGPPoint;TGPPoint) : TGPGraphicsPath

From Mitov Wiki Doc
Jump to: navigation, search

This is a Beta Read Only version of this page. Please review and send recommendations to mitov@mitov.com. We will enable the editing as soon as we are happy with the overall Wiki site.

Class: IGPGraphicsPath

Contents

Syntax

Delphi:

function AddBezier( pt1 : TGPPoint, pt2 : TGPPoint, pt3 : TGPPoint, pt4 : TGPPoint ) : TGPGraphicsPath;

C++ Builder:

TGPGraphicsPath __fastcall AddBezier( TGPPoint pt1, TGPPoint pt2, TGPPoint pt3, TGPPoint pt4 );

Visual C++ (MFC):

AddBezier(  pt1,  pt2,  pt3,  pt4 );

Summary

Adds a Bézier spline to the current figure of this path.

Description

Call this method to add a Bézier spline to the current figure of this path.


Example:

The following example creates a TGPGraphicsPath object path, adds a Bézier spline to path, closes the current figure (the only figure in this case), and then draws path.

var
  AGraphics : IGPGraphics;
  APath : IGPGraphicsPath;

begin
  AGraphics := TGPGraphics.Create( ACanvas );
  APath := TGLPath.Create();

  APath.AddBezier( MakePoint(50, 50), MakePoint(60, 20), MakePoint(70, 100), MakePoint(80, 50));
  APath.CloseFigure();

  // Draw the path.
  graphics.DrawPath( TGPPen.Create( aclRed ), APath );
end;

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox