Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Core / CSharp / System / Windows / Media / GeometryGroup.cs / 1305600 / 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
- _ProxyChain.cs
- DataGridViewColumnEventArgs.cs
- SlipBehavior.cs
- ConnectionManagementSection.cs
- HatchBrush.cs
- FileCodeGroup.cs
- FontUnit.cs
- ClassHandlersStore.cs
- SpellerHighlightLayer.cs
- MobileControlBuilder.cs
- StringInfo.cs
- UriTemplatePathSegment.cs
- PathSegmentCollection.cs
- PrePostDescendentsWalker.cs
- versioninfo.cs
- TableLayout.cs
- VirtualPathProvider.cs
- TreeNodeStyleCollection.cs
- BitArray.cs
- NonVisualControlAttribute.cs
- MemberDomainMap.cs
- GraphicsPath.cs
- AuthenticateEventArgs.cs
- StringReader.cs
- XhtmlBasicPanelAdapter.cs
- ClrPerspective.cs
- RectangleConverter.cs
- QueryContinueDragEvent.cs
- ClonableStack.cs
- DBAsyncResult.cs
- StyleBamlTreeBuilder.cs
- loginstatus.cs
- SoapIgnoreAttribute.cs
- LoadWorkflowCommand.cs
- GroupBox.cs
- XmlNodeComparer.cs
- FormViewRow.cs
- SystemColorTracker.cs
- ControlUtil.cs
- ErrorTableItemStyle.cs
- CreateUserErrorEventArgs.cs
- WindowsIPAddress.cs
- XmlDocumentSerializer.cs
- Reference.cs
- TextTreeTextBlock.cs
- InfoCardRSAPKCS1SignatureFormatter.cs
- VectorAnimationUsingKeyFrames.cs
- CallSiteOps.cs
- EntityModelSchemaGenerator.cs
- PersonalizationDictionary.cs
- XamlReader.cs
- MissingMemberException.cs
- Point3D.cs
- SchemaElementDecl.cs
- PtsContext.cs
- DrawToolTipEventArgs.cs
- AdapterDictionary.cs
- _Win32.cs
- ElementNotEnabledException.cs
- StateWorkerRequest.cs
- BrowserCapabilitiesFactory.cs
- DatatypeImplementation.cs
- StateDesigner.LayoutSelectionGlyph.cs
- ProfileEventArgs.cs
- TextContainerHelper.cs
- GlobalAllocSafeHandle.cs
- ExpressionPrinter.cs
- PropertyEntry.cs
- WebPageTraceListener.cs
- MethodImplAttribute.cs
- DrawItemEvent.cs
- _IPv4Address.cs
- ResourceSet.cs
- RangeBase.cs
- Model3DGroup.cs
- Queue.cs
- WindowsSysHeader.cs
- Pkcs7Signer.cs
- WpfGeneratedKnownProperties.cs
- TypeInitializationException.cs
- WinFormsSecurity.cs
- Color.cs
- ButtonPopupAdapter.cs
- sqlstateclientmanager.cs
- ReflectEventDescriptor.cs
- TextAnchor.cs
- OdbcHandle.cs
- StatusBarPanel.cs
- RealizationDrawingContextWalker.cs
- DataViewListener.cs
- TreeNode.cs
- ScrollChangedEventArgs.cs
- HttpResponseWrapper.cs
- Tile.cs
- BaseCAMarshaler.cs
- SmtpLoginAuthenticationModule.cs
- FixUp.cs
- FixedSOMGroup.cs
- CmsUtils.cs
- HelpProvider.cs