Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / 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
- WmiEventSink.cs
- wgx_exports.cs
- BamlResourceContent.cs
- RadioButtonRenderer.cs
- LogLogRecordHeader.cs
- Accessors.cs
- CreateRefExpr.cs
- IdentityReference.cs
- TransportSecurityBindingElement.cs
- CallSiteBinder.cs
- TextStore.cs
- WorkflowInstanceRecord.cs
- ParentUndoUnit.cs
- SamlDoNotCacheCondition.cs
- DependsOnAttribute.cs
- PkcsMisc.cs
- CompilerErrorCollection.cs
- OuterGlowBitmapEffect.cs
- RequestResponse.cs
- SectionRecord.cs
- SchemaElement.cs
- WindowsRichEdit.cs
- ComboBoxRenderer.cs
- CollectionBase.cs
- Propagator.ExtentPlaceholderCreator.cs
- AppearanceEditorPart.cs
- RequestUriProcessor.cs
- FormParameter.cs
- StreamResourceInfo.cs
- AssemblyResolver.cs
- ApplicationServiceHelper.cs
- AccessDataSourceWizardForm.cs
- RegistrySecurity.cs
- XmlSchemaType.cs
- ForeignKeyConstraint.cs
- DefaultSection.cs
- SimpleRecyclingCache.cs
- SafeRightsManagementPubHandle.cs
- PageCatalogPart.cs
- EraserBehavior.cs
- ExtentKey.cs
- EntityDataSourceMemberPath.cs
- DetailsViewUpdateEventArgs.cs
- LocatorPart.cs
- FixedSchema.cs
- HttpContext.cs
- EntityStoreSchemaGenerator.cs
- TextEditorSpelling.cs
- FileLoadException.cs
- LambdaCompiler.Address.cs
- ParallelTimeline.cs
- TimeoutException.cs
- UrlAuthFailedErrorFormatter.cs
- SoapProtocolImporter.cs
- PropertyManager.cs
- GridView.cs
- LoginStatusDesigner.cs
- RuleConditionDialog.Designer.cs
- DefaultTypeArgumentAttribute.cs
- InputScopeNameConverter.cs
- UncommonField.cs
- MaterialGroup.cs
- RemoteEndpointMessageProperty.cs
- EditorZone.cs
- DatePicker.cs
- DecimalSumAggregationOperator.cs
- SqlTypesSchemaImporter.cs
- DesignTimeResourceProviderFactoryAttribute.cs
- RoleExceptions.cs
- EntityStoreSchemaFilterEntry.cs
- embossbitmapeffect.cs
- Ipv6Element.cs
- MonthChangedEventArgs.cs
- EncodingDataItem.cs
- WebPartTransformer.cs
- TextSelectionProcessor.cs
- StreamWriter.cs
- SqlMethodAttribute.cs
- TreeBuilder.cs
- PreservationFileWriter.cs
- WindowsTooltip.cs
- SqlConnectionHelper.cs
- RectValueSerializer.cs
- listviewsubitemcollectioneditor.cs
- DbgUtil.cs
- ToolboxComponentsCreatedEventArgs.cs
- MaskInputRejectedEventArgs.cs
- MethodCallConverter.cs
- PointUtil.cs
- ActivityScheduledQuery.cs
- EventPrivateKey.cs
- SystemUnicastIPAddressInformation.cs
- FileVersionInfo.cs
- SmiMetaData.cs
- SharedPerformanceCounter.cs
- CacheVirtualItemsEvent.cs
- Helpers.cs
- BackgroundWorker.cs
- CatalogZoneBase.cs
- GridItemPattern.cs