Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / wpf / src / Core / CSharp / System / Windows / Media / GeometryGroup.cs / 1 / GeometryGroup.cs
//---------------------------------------------------------------------------- // // Copyright (c) Microsoft Corporation. All rights reserved. // // Description: Implementation of GeometryGroup // // History: // 2004/11/11-Michka // Created it // //--------------------------------------------------------------------------- using System; using MS.Internal; using System.ComponentModel; using System.ComponentModel.Design.Serialization; using System.Diagnostics; using System.Reflection; using System.Collections; using System.Text; using System.Globalization; using System.Windows.Media; using System.Windows; using System.Windows.Media.Composition; using System.Text.RegularExpressions; using System.Windows.Media.Animation; using System.Windows.Markup; using System.Runtime.InteropServices; using SR=MS.Internal.PresentationCore.SR; using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media { #region GeometryGroup ////// GeometryGroup /// [ContentProperty("Children")] public sealed partial class GeometryGroup : Geometry { #region Constructors ////// Default constructor /// public GeometryGroup() { } #endregion #region Overrides ////// GetPathGeometryData - returns a struct which contains this Geometry represented /// as a path geometry's serialized format. /// internal override PathGeometryData GetPathGeometryData() { PathGeometry pathGeometry = GetAsPathGeometry(); return pathGeometry.GetPathGeometryData(); } internal override PathGeometry GetAsPathGeometry() { PathGeometry pg = new PathGeometry(); pg.AddGeometry(this); pg.FillRule = FillRule; Debug.Assert(pg.CanFreeze); return pg; } #endregion #region GetPathFigureCollection internal override PathFigureCollection GetTransformedFigureCollection(Transform transform) { // Combine the transform argument with the internal transform Transform combined = new MatrixTransform(GetCombinedMatrix(transform)); PathFigureCollection result = new PathFigureCollection(); GeometryCollection children = Children; if (children != null) { for (int i = 0; i < children.Count; i++) { PathFigureCollection pathFigures = children.Internal_GetItem(i).GetTransformedFigureCollection(combined); if (pathFigures != null) { int count = pathFigures.Count; for (int j = 0; j < count; ++j) { result.Add(pathFigures[j]); } } } } return result; } #endregion #region IsEmpty ////// Returns true if this geometry is empty /// public override bool IsEmpty() { GeometryCollection children = Children; if (children == null) { return true; } for (int i=0; i/// Returns true if this geometry may have curved segments /// public override bool MayHaveCurves() { GeometryCollection children = Children; if (children == null) { return false; } for (int i = 0; i < children.Count; i++) { if (((Geometry)children[i]).MayHaveCurves()) { return true; } } return false; } } #endregion } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //---------------------------------------------------------------------------- // // Copyright (c) Microsoft Corporation. All rights reserved. // // Description: Implementation of GeometryGroup // // History: // 2004/11/11-Michka // Created it // //--------------------------------------------------------------------------- using System; using MS.Internal; using System.ComponentModel; using System.ComponentModel.Design.Serialization; using System.Diagnostics; using System.Reflection; using System.Collections; using System.Text; using System.Globalization; using System.Windows.Media; using System.Windows; using System.Windows.Media.Composition; using System.Text.RegularExpressions; using System.Windows.Media.Animation; using System.Windows.Markup; using System.Runtime.InteropServices; using SR=MS.Internal.PresentationCore.SR; using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media { #region GeometryGroup /// /// GeometryGroup /// [ContentProperty("Children")] public sealed partial class GeometryGroup : Geometry { #region Constructors ////// Default constructor /// public GeometryGroup() { } #endregion #region Overrides ////// GetPathGeometryData - returns a struct which contains this Geometry represented /// as a path geometry's serialized format. /// internal override PathGeometryData GetPathGeometryData() { PathGeometry pathGeometry = GetAsPathGeometry(); return pathGeometry.GetPathGeometryData(); } internal override PathGeometry GetAsPathGeometry() { PathGeometry pg = new PathGeometry(); pg.AddGeometry(this); pg.FillRule = FillRule; Debug.Assert(pg.CanFreeze); return pg; } #endregion #region GetPathFigureCollection internal override PathFigureCollection GetTransformedFigureCollection(Transform transform) { // Combine the transform argument with the internal transform Transform combined = new MatrixTransform(GetCombinedMatrix(transform)); PathFigureCollection result = new PathFigureCollection(); GeometryCollection children = Children; if (children != null) { for (int i = 0; i < children.Count; i++) { PathFigureCollection pathFigures = children.Internal_GetItem(i).GetTransformedFigureCollection(combined); if (pathFigures != null) { int count = pathFigures.Count; for (int j = 0; j < count; ++j) { result.Add(pathFigures[j]); } } } } return result; } #endregion #region IsEmpty ////// Returns true if this geometry is empty /// public override bool IsEmpty() { GeometryCollection children = Children; if (children == null) { return true; } for (int i=0; i/// Returns true if this geometry may have curved segments /// public override bool MayHaveCurves() { GeometryCollection children = Children; if (children == null) { return false; } for (int i = 0; i < children.Count; i++) { if (((Geometry)children[i]).MayHaveCurves()) { return true; } } return false; } } #endregion } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- WSHttpBindingElement.cs
- XmlSchemaCompilationSettings.cs
- IpcClientChannel.cs
- MessageSmuggler.cs
- SmtpFailedRecipientException.cs
- DataGridRow.cs
- ProcessInfo.cs
- MessageAction.cs
- ProfileGroupSettingsCollection.cs
- behaviorssection.cs
- XmlSchemaDatatype.cs
- FormsAuthenticationCredentials.cs
- DataControlFieldCell.cs
- Pointer.cs
- NegotiationTokenAuthenticatorStateCache.cs
- CorrelationValidator.cs
- XmlCountingReader.cs
- ReflectEventDescriptor.cs
- FunctionNode.cs
- ConnectionPoolManager.cs
- WsdlBuildProvider.cs
- PopOutPanel.cs
- TransformDescriptor.cs
- AssemblyCache.cs
- KnownBoxes.cs
- MetadataCollection.cs
- DeploymentSection.cs
- EntitySetDataBindingList.cs
- Rss20FeedFormatter.cs
- GcHandle.cs
- CopyAttributesAction.cs
- DesignerEditorPartChrome.cs
- WinEventTracker.cs
- DataFormat.cs
- QuadTree.cs
- UserControl.cs
- MetadataSerializer.cs
- Variable.cs
- MapPathBasedVirtualPathProvider.cs
- DataProtection.cs
- TripleDES.cs
- ProfileGroupSettings.cs
- SafeSystemMetrics.cs
- LinkedResourceCollection.cs
- BitmapEffectDrawing.cs
- GridErrorDlg.cs
- TypeListConverter.cs
- DoubleLinkList.cs
- OutputCacheModule.cs
- MailDefinition.cs
- PolicyChain.cs
- CodeCatchClause.cs
- SignedXmlDebugLog.cs
- MULTI_QI.cs
- precedingsibling.cs
- RequestTimeoutManager.cs
- MethodBuilder.cs
- BitStream.cs
- EventDescriptorCollection.cs
- CompositeControl.cs
- PeerEndPoint.cs
- EntityModelSchemaGenerator.cs
- XmlAttributeCache.cs
- AssemblyAttributes.cs
- PropertyItem.cs
- __Error.cs
- StringDictionaryWithComparer.cs
- GridViewAutomationPeer.cs
- IteratorFilter.cs
- HtmlPhoneCallAdapter.cs
- Timer.cs
- ListSortDescriptionCollection.cs
- QuadraticBezierSegment.cs
- ListControl.cs
- SHA384Managed.cs
- LayoutEditorPart.cs
- BitmapEffect.cs
- SerializerDescriptor.cs
- Matrix3DConverter.cs
- OutOfMemoryException.cs
- TransactionInformation.cs
- LoginView.cs
- RegexMatchCollection.cs
- ImportFileRequest.cs
- Queue.cs
- CollectionView.cs
- InputScope.cs
- ShadowGlyph.cs
- EmptyControlCollection.cs
- TimelineCollection.cs
- PanningMessageFilter.cs
- UpDownBaseDesigner.cs
- ClientType.cs
- SecurityAppliedMessage.cs
- XmlDownloadManager.cs
- COM2ExtendedBrowsingHandler.cs
- GlobalAllocSafeHandle.cs
- DnsPermission.cs
- ForeignConstraint.cs
- SQLConvert.cs