Method function IGDIPlus.IGPGraphicsPath.Transform(IGPMatrix) : 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 Transform( matrix : IGPMatrix ) : TGPGraphicsPath;

C++ Builder:

TGPGraphicsPath __fastcall Transform( IGPMatrix matrix );

Visual C++ (MFC):

Transform(  matrix );

Summary

Multiplies each of this path's data points by a specified matrix.

Description

Call this method to multiply each of this path's data points

by a specified matrix.



Example:

The following example creates a TGPGraphicsPath object and
adds a rectangle to the path. The code draws the path,
transforms the path, and then draws the path again.

var
  AGraphics : IGPGraphics;
  APath     : IGPGraphicsPath;
  AMatrix   : IGPMatrix;


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


  APath.AddRectangle( MakeRect(40, 10, 200, 50));

  // Draw the path in blue before applying a transformation.
  AGraphics.DrawPath( TGPPen.Create( aclBlue )), APath);

  // Transform the path.
  AMatrix := TGPMatrix.Create();
  AMatrix.Rotate(30.0f);
  path.Transform( AMatrix );

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

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox