Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Core / CSharp / System / Windows / Media / StreamGeometryContext.cs / 1305600 / StreamGeometryContext.cs
//----------------------------------------------------------------------------
//
//
// Copyright (C) Microsoft Corporation. All rights reserved.
//
//
// This class is used by the StreamGeometry class to generate an inlined,
// flattened geometry stream.
//
//---------------------------------------------------------------------------
using MS.Internal;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Security;
using System.Security.Permissions;
#if !PBTCOMPILER
using System.Runtime.InteropServices;
using System.Windows.Threading;
using System.Windows;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Media.Composition;
using System.Windows.Media.Effects;
using System.Windows.Media.Imaging;
using System.Windows.Media.Media3D;
using System.Diagnostics;
using SR=MS.Internal.PresentationCore.SR;
using SRID=MS.Internal.PresentationCore.SRID;
using MS.Internal.PresentationCore;
namespace System.Windows.Media
#elif PBTCOMPILER
using MS.Internal.Markup;
namespace MS.Internal.Markup
#endif
{
///
/// StreamGeometryContext
///
#if ! PBTCOMPILER
public abstract class StreamGeometryContext : DispatcherObject, IDisposable
#else
internal abstract class StreamGeometryContext : IDisposable
#endif
{
#region Constructors
///
/// This constructor exists to prevent external derivation
///
internal StreamGeometryContext()
{
}
#endregion Constructors
#region IDisposable
void IDisposable.Dispose()
{
#if ! PBTCOMPILER
VerifyAccess();
#endif
DisposeCore();
GC.SuppressFinalize(this);
}
#endregion IDisposable
#region Public Methods
///
/// Closes the StreamContext and flushes the content.
/// Afterwards the StreamContext can not be used anymore.
/// This call does not require all Push calls to have been Popped.
///
///
/// This call is illegal if this object has already been closed or disposed.
///
public virtual void Close()
{
DisposeCore();
}
///
/// BeginFigure - Start a new figure.
///
public abstract void BeginFigure(Point startPoint, bool isFilled, bool isClosed);
///
/// LineTo - append a LineTo to the current figure.
///
public abstract void LineTo(Point point, bool isStroked, bool isSmoothJoin);
///
/// QuadraticBezierTo - append a QuadraticBezierTo to the current figure.
///
public abstract void QuadraticBezierTo(Point point1, Point point2, bool isStroked, bool isSmoothJoin);
///
/// BezierTo - apply a BezierTo to the current figure.
///
public abstract void BezierTo(Point point1, Point point2, Point point3, bool isStroked, bool isSmoothJoin);
///
/// PolyLineTo - append a PolyLineTo to the current figure.
///
public abstract void PolyLineTo(IList points, bool isStroked, bool isSmoothJoin);
///
/// PolyQuadraticBezierTo - append a PolyQuadraticBezierTo to the current figure.
///
public abstract void PolyQuadraticBezierTo(IList points, bool isStroked, bool isSmoothJoin);
///
/// PolyBezierTo - append a PolyBezierTo to the current figure.
///
public abstract void PolyBezierTo(IList points, bool isStroked, bool isSmoothJoin);
///
/// ArcTo - append an ArcTo to the current figure.
///
// Special case this one. Bringing in sweep direction requires code-gen changes.
//
#if !PBTCOMPILER
public abstract void ArcTo(Point point, Size size, double rotationAngle, bool isLargeArc, SweepDirection sweepDirection, bool isStroked, bool isSmoothJoin);
#else
public abstract void ArcTo(Point point, Size size, double rotationAngle, bool isLargeArc, bool sweepDirection, bool isStroked, bool isSmoothJoin);
#endif
#endregion Public Methods
///
/// This is the same as the Close call:
/// Closes the Context and flushes the content.
/// Afterwards the Context can not be used anymore.
/// This call does not require all Push calls to have been Popped.
///
///
/// This call is illegal if this object has already been closed or disposed.
///
internal virtual void DisposeCore() {}
///
/// SetClosedState - Sets the current closed state of the figure.
///
internal abstract void SetClosedState(bool closed);
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.
//----------------------------------------------------------------------------
//
//
// Copyright (C) Microsoft Corporation. All rights reserved.
//
//
// This class is used by the StreamGeometry class to generate an inlined,
// flattened geometry stream.
//
//---------------------------------------------------------------------------
using MS.Internal;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Security;
using System.Security.Permissions;
#if !PBTCOMPILER
using System.Runtime.InteropServices;
using System.Windows.Threading;
using System.Windows;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Media.Composition;
using System.Windows.Media.Effects;
using System.Windows.Media.Imaging;
using System.Windows.Media.Media3D;
using System.Diagnostics;
using SR=MS.Internal.PresentationCore.SR;
using SRID=MS.Internal.PresentationCore.SRID;
using MS.Internal.PresentationCore;
namespace System.Windows.Media
#elif PBTCOMPILER
using MS.Internal.Markup;
namespace MS.Internal.Markup
#endif
{
///
/// StreamGeometryContext
///
#if ! PBTCOMPILER
public abstract class StreamGeometryContext : DispatcherObject, IDisposable
#else
internal abstract class StreamGeometryContext : IDisposable
#endif
{
#region Constructors
///
/// This constructor exists to prevent external derivation
///
internal StreamGeometryContext()
{
}
#endregion Constructors
#region IDisposable
void IDisposable.Dispose()
{
#if ! PBTCOMPILER
VerifyAccess();
#endif
DisposeCore();
GC.SuppressFinalize(this);
}
#endregion IDisposable
#region Public Methods
///
/// Closes the StreamContext and flushes the content.
/// Afterwards the StreamContext can not be used anymore.
/// This call does not require all Push calls to have been Popped.
///
///
/// This call is illegal if this object has already been closed or disposed.
///
public virtual void Close()
{
DisposeCore();
}
///
/// BeginFigure - Start a new figure.
///
public abstract void BeginFigure(Point startPoint, bool isFilled, bool isClosed);
///
/// LineTo - append a LineTo to the current figure.
///
public abstract void LineTo(Point point, bool isStroked, bool isSmoothJoin);
///
/// QuadraticBezierTo - append a QuadraticBezierTo to the current figure.
///
public abstract void QuadraticBezierTo(Point point1, Point point2, bool isStroked, bool isSmoothJoin);
///
/// BezierTo - apply a BezierTo to the current figure.
///
public abstract void BezierTo(Point point1, Point point2, Point point3, bool isStroked, bool isSmoothJoin);
///
/// PolyLineTo - append a PolyLineTo to the current figure.
///
public abstract void PolyLineTo(IList points, bool isStroked, bool isSmoothJoin);
///
/// PolyQuadraticBezierTo - append a PolyQuadraticBezierTo to the current figure.
///
public abstract void PolyQuadraticBezierTo(IList points, bool isStroked, bool isSmoothJoin);
///
/// PolyBezierTo - append a PolyBezierTo to the current figure.
///
public abstract void PolyBezierTo(IList points, bool isStroked, bool isSmoothJoin);
///
/// ArcTo - append an ArcTo to the current figure.
///
// Special case this one. Bringing in sweep direction requires code-gen changes.
//
#if !PBTCOMPILER
public abstract void ArcTo(Point point, Size size, double rotationAngle, bool isLargeArc, SweepDirection sweepDirection, bool isStroked, bool isSmoothJoin);
#else
public abstract void ArcTo(Point point, Size size, double rotationAngle, bool isLargeArc, bool sweepDirection, bool isStroked, bool isSmoothJoin);
#endif
#endregion Public Methods
///
/// This is the same as the Close call:
/// Closes the Context and flushes the content.
/// Afterwards the Context can not be used anymore.
/// This call does not require all Push calls to have been Popped.
///
///
/// This call is illegal if this object has already been closed or disposed.
///
internal virtual void DisposeCore() {}
///
/// SetClosedState - Sets the current closed state of the figure.
///
internal abstract void SetClosedState(bool closed);
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- LayoutUtils.cs
- ParameterToken.cs
- TransformPatternIdentifiers.cs
- DotExpr.cs
- Error.cs
- RtfToXamlLexer.cs
- ClusterRegistryConfigurationProvider.cs
- SqlException.cs
- ToolZone.cs
- TextInfo.cs
- ImageClickEventArgs.cs
- HttpResponse.cs
- DataGridColumnCollection.cs
- AutomationPropertyInfo.cs
- InkSerializer.cs
- SqlDataSourceStatusEventArgs.cs
- Size3DValueSerializer.cs
- NameSpaceEvent.cs
- SqlHelper.cs
- OdbcReferenceCollection.cs
- MetadataStore.cs
- MessageHeaders.cs
- LinqTreeNodeEvaluator.cs
- CompositeDispatchFormatter.cs
- RelatedView.cs
- CryptoApi.cs
- ObjectQuery.cs
- Comparer.cs
- WinInet.cs
- Array.cs
- TextTreeRootNode.cs
- EditorZoneBase.cs
- InsufficientMemoryException.cs
- ResourceDescriptionAttribute.cs
- ControlEvent.cs
- OutKeywords.cs
- DisposableCollectionWrapper.cs
- WeakEventManager.cs
- ByteAnimationBase.cs
- SSmlParser.cs
- QueryPageSettingsEventArgs.cs
- Win32SafeHandles.cs
- XmlSchemaValidationException.cs
- Queue.cs
- HMACMD5.cs
- RelatedEnd.cs
- XmlEnumAttribute.cs
- DataGridViewCellCancelEventArgs.cs
- ClosableStream.cs
- DocumentViewerAutomationPeer.cs
- ImageButton.cs
- SkipQueryOptionExpression.cs
- DataContractJsonSerializer.cs
- CurrentChangingEventArgs.cs
- FaultReason.cs
- SqlInternalConnectionTds.cs
- XmlLoader.cs
- DrawingVisual.cs
- ReaderContextStackData.cs
- XmlAttributeOverrides.cs
- GridPattern.cs
- HtmlTable.cs
- NetSectionGroup.cs
- Pen.cs
- PermissionSet.cs
- DetailsViewPagerRow.cs
- CompoundFileDeflateTransform.cs
- DSGeneratorProblem.cs
- WebBrowserEvent.cs
- InfoCardRSAPKCS1SignatureDeformatter.cs
- HttpClientChannel.cs
- RoutedEventConverter.cs
- BindingWorker.cs
- KnownTypesProvider.cs
- WpfSharedBamlSchemaContext.cs
- DeflateEmulationStream.cs
- categoryentry.cs
- WebColorConverter.cs
- ScanQueryOperator.cs
- DataPagerCommandEventArgs.cs
- StringFreezingAttribute.cs
- SqlConnectionPoolGroupProviderInfo.cs
- FacetEnabledSchemaElement.cs
- EmptyEnumerator.cs
- ComplexLine.cs
- WebPartCancelEventArgs.cs
- DBDataPermission.cs
- Quad.cs
- GeneralTransform3DGroup.cs
- ConnectionProviderAttribute.cs
- ReferentialConstraint.cs
- OutputScopeManager.cs
- FlowDocumentReaderAutomationPeer.cs
- HttpApplication.cs
- CodeCommentStatement.cs
- odbcmetadatafactory.cs
- CompositeTypefaceMetrics.cs
- BitHelper.cs
- LinkTarget.cs
- TheQuery.cs