Method function IGDIPlus.IGPGraphics.ResetClip() : TGPGraphics

From Mitov Wiki Doc
Revision as of 17:19, 18 October 2012 by David Alm (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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: IGPGraphics

Contents

Syntax

Delphi:

function ResetClip() : TGPGraphics;

C++ Builder:

TGPGraphics __fastcall ResetClip();

Visual C++ (MFC):

ResetClip();

Summary

Sets the clipping region of this Graphics object to an infinite region.

Description

Call this method to set the clipping region of this Graphics

object to an infinite region.



Example:

The following example creates a Graphics object and sets its
clipping region to a rectangle. The code fills two ellipses
that intersect the rectangular clipping region. The first
ellipse is clipped, but the second ellipse is not clipped
because it is filled after a call to ResetClip.

var
  AGraphics : IGPGraphics;

begin
  AGraphics := TGPGraphics.Create( ACanvas );


  // Set the clipping region, and draw its outline.
  AGraphics.SetClip( MakeRect(100, 50, 200, 120));
  AGraphics.DrawRectangle( TGPPen.Create( aclBlack ), 100, 50, 200, 120);

  // Fill a clipped ellipse in red.
  AGraphics.FillEllipse( TGPSolidBrush.Create( aclRed ), 80, 40, 100, 70);

  // Reset the clipping region.
  AGraphics.ResetClip();

  // Fill an unclipped ellipse with blue.
  AGraphics.FillEllipse(TGPSolidBrush.Create( aclBlue ), 160, 150, 100, 60);
end;

Remarks If the clipping region of a Graphics object is infinite, then items drawn by that Graphics object will not be clipped.

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox