Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / 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
- Hash.cs
- DateTimeFormatInfo.cs
- UIElement.cs
- MessageLogTraceRecord.cs
- RecognitionResult.cs
- ForEach.cs
- MergeLocalizationDirectives.cs
- RecognizedPhrase.cs
- InkCollectionBehavior.cs
- OdbcCommand.cs
- PageAsyncTaskManager.cs
- MetricEntry.cs
- EventProviderWriter.cs
- FindCriteriaCD1.cs
- TraceHandler.cs
- Vector3DConverter.cs
- CreateUserWizard.cs
- InputBindingCollection.cs
- LabelDesigner.cs
- NavigationPropertyEmitter.cs
- DataTemplateSelector.cs
- CheckBoxStandardAdapter.cs
- ObjectFactoryCodeDomTreeGenerator.cs
- CursorEditor.cs
- DocumentApplicationDocumentViewer.cs
- CharacterShapingProperties.cs
- ListControl.cs
- CacheChildrenQuery.cs
- BounceEase.cs
- DataSetMappper.cs
- _emptywebproxy.cs
- SamlAssertionDirectKeyIdentifierClause.cs
- ToolTip.cs
- SamlConditions.cs
- PropertyInformationCollection.cs
- HttpModuleActionCollection.cs
- SwitchAttribute.cs
- TextRangeBase.cs
- HashCodeCombiner.cs
- OutputCacheSettings.cs
- URLMembershipCondition.cs
- DynamicPropertyReader.cs
- Durable.cs
- GraphicsContainer.cs
- SessionStateModule.cs
- GraphicsContainer.cs
- EditorBrowsableAttribute.cs
- AlphabeticalEnumConverter.cs
- WarningException.cs
- DataKeyCollection.cs
- FactoryId.cs
- KeyValuePairs.cs
- COAUTHINFO.cs
- UrlAuthFailedErrorFormatter.cs
- BaseTemplateCodeDomTreeGenerator.cs
- SqlSelectStatement.cs
- SystemIcons.cs
- Timer.cs
- Pair.cs
- HttpProcessUtility.cs
- SHA512Cng.cs
- xmlglyphRunInfo.cs
- OdbcConnectionString.cs
- TrustLevel.cs
- cookiecontainer.cs
- webproxy.cs
- ColumnReorderedEventArgs.cs
- IndexOutOfRangeException.cs
- Scripts.cs
- HtmlMeta.cs
- TextRangeEdit.cs
- SystemIcons.cs
- InputProviderSite.cs
- BoundsDrawingContextWalker.cs
- TransformConverter.cs
- UriTemplateVariablePathSegment.cs
- AssertFilter.cs
- IisTraceListener.cs
- ContainerParagraph.cs
- UserControl.cs
- DataGridColumn.cs
- XmlMtomReader.cs
- CommandID.cs
- JpegBitmapDecoder.cs
- Metadata.cs
- OutputCacheProfileCollection.cs
- ObjectQuery.cs
- SkewTransform.cs
- nulltextcontainer.cs
- TextElementCollection.cs
- TrustManagerMoreInformation.cs
- TabControl.cs
- UInt16Converter.cs
- ExtendedProperty.cs
- CheckBoxAutomationPeer.cs
- ExpanderAutomationPeer.cs
- RawStylusInput.cs
- DPAPIProtectedConfigurationProvider.cs
- DBSchemaRow.cs
- HtmlTable.cs