<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="https://mitov.com/wiki/skins/common/feed.css?301"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://mitov.com/wiki/index.php?action=history&amp;feed=atom&amp;title=Method_function_IGDIPlus.IGPGraphics.EndContainer%28TGPGraphicsContainer%29_%3A_TGPGraphics</id>
		<title>Method function IGDIPlus.IGPGraphics.EndContainer(TGPGraphicsContainer) : TGPGraphics - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://mitov.com/wiki/index.php?action=history&amp;feed=atom&amp;title=Method_function_IGDIPlus.IGPGraphics.EndContainer%28TGPGraphicsContainer%29_%3A_TGPGraphics"/>
		<link rel="alternate" type="text/html" href="https://mitov.com/wiki/index.php?title=Method_function_IGDIPlus.IGPGraphics.EndContainer(TGPGraphicsContainer)_:_TGPGraphics&amp;action=history"/>
		<updated>2026-06-11T10:43:08Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.17.0</generator>

	<entry>
		<id>https://mitov.com/wiki/index.php?title=Method_function_IGDIPlus.IGPGraphics.EndContainer(TGPGraphicsContainer)_:_TGPGraphics&amp;diff=11835&amp;oldid=prev</id>
		<title>David Alm: Automated Syncronization with Documentation</title>
		<link rel="alternate" type="text/html" href="https://mitov.com/wiki/index.php?title=Method_function_IGDIPlus.IGPGraphics.EndContainer(TGPGraphicsContainer)_:_TGPGraphics&amp;diff=11835&amp;oldid=prev"/>
				<updated>2012-10-18T17:19:06Z</updated>
		
		<summary type="html">&lt;p&gt;Automated Syncronization with Documentation&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;b&amp;gt;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
This is a Beta Read Only version of this page. &lt;br /&gt;
Please review and send recommendations to [mailto:mitov@mitov.com mitov@mitov.com]. &lt;br /&gt;
We will enable the editing as soon as we are happy with the overall Wiki site.&lt;br /&gt;
&amp;lt;/span&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Class:''' [[Interface IGDIPlus.IGPGraphics|IGPGraphics]]&lt;br /&gt;
&lt;br /&gt;
== Syntax ==&lt;br /&gt;
=== Delphi: ===&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
'''function''' EndContainer( state : TGPGraphicsContainer ) : [[Class IGDIPlus.TGPGraphics|TGPGraphics]];&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== C++ Builder: ===&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
[[Class IGDIPlus.TGPGraphics|TGPGraphics]] '''__fastcall''' EndContainer( TGPGraphicsContainer state );&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Visual C++ (MFC): ===&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 EndContainer(  state );&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
Closes a graphics container that was previously opened by the [[Method function IGDIPlus.IGPGraphics.BeginContainer(TGPRect;TGPRect;TGPUnit) : TGPGraphicsContainer|BeginContainer]] method. &lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
Call this method to close a graphics container that was&lt;br /&gt;
previously opened by the [[Method function IGDIPlus.IGPGraphics.BeginContainer(TGPRect;TGPRect;TGPUnit) : TGPGraphicsContainer|BeginContainer]] method.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
The following example sets a clipping region for a Graphics&lt;br /&gt;
object and begins a graphics container. It then sets an&lt;br /&gt;
additional clipping region for the container and draws&lt;br /&gt;
rectangles that demonstrate the effective clipping region&lt;br /&gt;
inside the container.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 var&lt;br /&gt;
   AGraphics : [[Interface IGDIPlus.IGPGraphics|IGPGraphics]];&lt;br /&gt;
   APath : GraphicsPath ;&lt;br /&gt;
   ABlackPen : [[Interface IGDIPlus.IGPPen|IGPPen]];&lt;br /&gt;
   AContainer : IGPGraphicsContainer;&lt;br /&gt;
 &lt;br /&gt;
 begin&lt;br /&gt;
   AGraphics := [[Class IGDIPlus.TGPGraphics|TGPGraphics]].Create( ACanvas );&lt;br /&gt;
 &lt;br /&gt;
   // Set the clipping region for the Graphics object.&lt;br /&gt;
   AGraphics.[[Method function IGDIPlus.IGPGraphics.SetClip(IGPGraphics;TGPCombineMode) : TGPGraphics|SetClip]](MakeRect(10, 10, 150, 150));&lt;br /&gt;
 &lt;br /&gt;
   // Begin a graphics container.&lt;br /&gt;
   AContainer = AGraphics.[[Method function IGDIPlus.IGPGraphics.BeginContainer(TGPRect;TGPRect;TGPUnit) : TGPGraphicsContainer|BeginContainer]]();&lt;br /&gt;
 &lt;br /&gt;
   // Set an additional clipping region for the container.&lt;br /&gt;
   AGraphics.[[Method function IGDIPlus.IGPGraphics.SetClip(IGPGraphics;TGPCombineMode) : TGPGraphics|SetClip]]( MakeRect( 100, 50, 100, 75 ));&lt;br /&gt;
 &lt;br /&gt;
   // Fill a red rectangle in the container.&lt;br /&gt;
   AGraphics.[[Method function IGDIPlus.IGPGraphics.FillRectangle(IGPBrush;TGPRect) : TGPGraphics|FillRectangle]]( [[Class IGDIPlus.TGPSolidBrush|TGPSolidBrush]].Create( aclRed ), 0, 0, 400, 400);&lt;br /&gt;
 &lt;br /&gt;
   // End the container, and fill the same rectangle with blue.&lt;br /&gt;
   graphics.EndContainer( AContainer );&lt;br /&gt;
   AGraphics.[[Method function IGDIPlus.IGPGraphics.FillRectangle(IGPBrush;TGPRect) : TGPGraphics|FillRectangle]]( [[Class IGDIPlus.TGPSolidBrush|TGPSolidBrush]].Create( aclBlue ), 0, 0, 400, 400);&lt;br /&gt;
 &lt;br /&gt;
   // Set the clipping region to infinite, and draw the outlines&lt;br /&gt;
   // of the two previous clipping regions.&lt;br /&gt;
   AGraphics.[[Method function IGDIPlus.IGPGraphics.ResetClip() : TGPGraphics|ResetClip]]();&lt;br /&gt;
   ABlack := [[Class IGDIPlus.TGPPen|TGPPen]].Create( aclBlack, 2.0 );&lt;br /&gt;
   AGraphics.[[Method function IGDIPlus.IGPGraphics.DrawRectangle(IGPPen;TGPRect) : TGPGraphics|DrawRectangle]]( ABlack, 10, 10, 150, 150 );&lt;br /&gt;
   AGraphics.[[Method function IGDIPlus.IGPGraphics.DrawRectangle(IGPPen;TGPRect) : TGPGraphics|DrawRectangle]]( ABlack, 100, 50, 100, 75 );&lt;br /&gt;
 end;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Remarks&lt;br /&gt;
When you call the [[Method function IGDIPlus.IGPGraphics.BeginContainer(TGPRect;TGPRect;TGPUnit) : TGPGraphicsContainer|BeginContainer]] method of a Graphics object,&lt;br /&gt;
an information block that holds the state of the Graphics&lt;br /&gt;
object is put on a stack. The [[Method function IGDIPlus.IGPGraphics.BeginContainer(TGPRect;TGPRect;TGPUnit) : TGPGraphicsContainer|BeginContainer]] method returns a&lt;br /&gt;
value that identifies that information block. When you pass&lt;br /&gt;
the identifying value to the EndContainer method, the&lt;br /&gt;
information block is removed from the stack and is used to&lt;br /&gt;
restore the Graphics object to the state it was in at the&lt;br /&gt;
time of the [[Method function IGDIPlus.IGPGraphics.BeginContainer(TGPRect;TGPRect;TGPUnit) : TGPGraphicsContainer|BeginContainer]] call.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Containers can be nested; that is, you can call the&lt;br /&gt;
[[Method function IGDIPlus.IGPGraphics.BeginContainer(TGPRect;TGPRect;TGPUnit) : TGPGraphicsContainer|BeginContainer]] method several times before you call the&lt;br /&gt;
EndContainer method. Each time you call the [[Method function IGDIPlus.IGPGraphics.BeginContainer(TGPRect;TGPRect;TGPUnit) : TGPGraphicsContainer|BeginContainer]]&lt;br /&gt;
method, an information block is put on the stack, and you&lt;br /&gt;
receive an identifier for the information block. When you&lt;br /&gt;
pass one of those identifiers to the EndContainer method, the&lt;br /&gt;
Graphics object is returned to the state it was in at the&lt;br /&gt;
time of the [[Method function IGDIPlus.IGPGraphics.BeginContainer(TGPRect;TGPRect;TGPUnit) : TGPGraphicsContainer|BeginContainer]] call that returned that particular&lt;br /&gt;
identifier. The information block placed on the stack by that&lt;br /&gt;
[[Method function IGDIPlus.IGPGraphics.BeginContainer(TGPRect;TGPRect;TGPUnit) : TGPGraphicsContainer|BeginContainer]] call is removed from the stack, and all&lt;br /&gt;
information blocks placed on that stack after that&lt;br /&gt;
[[Method function IGDIPlus.IGPGraphics.BeginContainer(TGPRect;TGPRect;TGPUnit) : TGPGraphicsContainer|BeginContainer]] call are also removed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Calls to the [[Method function IGDIPlus.IGPGraphics.Save() : TGPGraphicsState|Save]] method place information blocks on the same&lt;br /&gt;
stack as calls to the [[Method function IGDIPlus.IGPGraphics.BeginContainer(TGPRect;TGPRect;TGPUnit) : TGPGraphicsContainer|BeginContainer]] method. Just as an&lt;br /&gt;
EndContainer call is paired with a [[Method function IGDIPlus.IGPGraphics.BeginContainer(TGPRect;TGPRect;TGPUnit) : TGPGraphicsContainer|BeginContainer]] call, a&lt;br /&gt;
[[Method function IGDIPlus.IGPGraphics.Restore(TGPGraphicsState) : TGPGraphics|Restore]] call is paired with a [[Method function IGDIPlus.IGPGraphics.Save() : TGPGraphicsState|Save]] call.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Caution When you call EndContainer, all information blocks&lt;br /&gt;
placed on the stack (by [[Method function IGDIPlus.IGPGraphics.Save() : TGPGraphicsState|Save]] or by [[Method function IGDIPlus.IGPGraphics.BeginContainer(TGPRect;TGPRect;TGPUnit) : TGPGraphicsContainer|BeginContainer]]) after the&lt;br /&gt;
corresponding call to [[Method function IGDIPlus.IGPGraphics.BeginContainer(TGPRect;TGPRect;TGPUnit) : TGPGraphicsContainer|BeginContainer]] are removed from the&lt;br /&gt;
stack. Likewise, when you call [[Method function IGDIPlus.IGPGraphics.Restore(TGPGraphicsState) : TGPGraphics|Restore]], all information&lt;br /&gt;
blocks placed on the stack (by [[Method function IGDIPlus.IGPGraphics.Save() : TGPGraphicsState|Save]] or by [[Method function IGDIPlus.IGPGraphics.BeginContainer(TGPRect;TGPRect;TGPUnit) : TGPGraphicsContainer|BeginContainer]])&lt;br /&gt;
after the corresponding call to [[Method function IGDIPlus.IGPGraphics.Save() : TGPGraphicsState|Save]] are removed from the&lt;br /&gt;
stack.&lt;/div&gt;</summary>
		<author><name>David Alm</name></author>	</entry>

	</feed>