Code:
/ DotNET / DotNET / 8.0 / untmp / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / Core / System / Windows / Media / LineSegment.cs / 1 / LineSegment.cs
//------------------------------------------------------------------------------ // Microsoft Avalon // Copyright (c) Microsoft Corporation, 2001 // // File: LineSegment.cs //----------------------------------------------------------------------------- using System; using MS.Internal; using MS.Internal.PresentationCore; using System.ComponentModel; using System.ComponentModel.Design.Serialization; using System.Reflection; using System.Collections; using System.Text; using System.Globalization; using System.Windows.Media; using System.Windows; using System.Text.RegularExpressions; using System.Windows.Media.Animation; using System.Windows.Media.Composition; using System.Diagnostics; using System.Security; using System.Security.Permissions; using SR=MS.Internal.PresentationCore.SR; using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media { ////// LineSegment /// public sealed partial class LineSegment : PathSegment { #region Constructors ////// /// public LineSegment() { } ////// /// public LineSegment(Point point, bool isStroked) { Point = point; IsStroked = isStroked; } // Internal constructor supporting smooth joins between segments internal LineSegment(Point point, bool isStroked, bool isSmoothJoin) { Point = point; IsStroked = isStroked; IsSmoothJoin = isSmoothJoin; } #endregion #region AddToFigure internal override void AddToFigure( Matrix matrix, // The transformation matrid PathFigure figure, // The figure to add to ref Point current) // Out: Segment endpoint, not transformed { current = Point; if (matrix.IsIdentity) { figure.Segments.Add(this); } else { Point pt = current; pt *= matrix; figure.Segments.Add(new LineSegment(pt, IsStroked, IsSmoothJoin)); } } #endregion ////// SerializeData - Serialize the contents of this Segment to the provided context. /// internal override void SerializeData(StreamGeometryContext ctx) { ctx.LineTo(Point, IsStroked, IsSmoothJoin); } internal override bool IsCurved() { return false; } ////// Creates a string representation of this object based on the format string /// and IFormatProvider passed in. /// If the provider is null, the CurrentCulture is used. /// See the documentation for IFormattable for more information. /// ////// A string representation of this object. /// internal override string ConvertToString(string format, IFormatProvider provider) { return "L" + ((IFormattable)Point).ToString(format, provider); } } } // 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
- ListBoxItem.cs
- DataServiceHostFactory.cs
- DataRowExtensions.cs
- AllMembershipCondition.cs
- ToolStripLabel.cs
- BehaviorService.cs
- PngBitmapEncoder.cs
- EditorPartCollection.cs
- PhysicalAddress.cs
- OutputScope.cs
- XmlValueConverter.cs
- panel.cs
- EnvironmentPermission.cs
- RestrictedTransactionalPackage.cs
- ParseElement.cs
- ExtensionQuery.cs
- UndoEngine.cs
- TreeView.cs
- AssemblyBuilderData.cs
- SafeRsaProviderHandle.cs
- BitmapEffectInput.cs
- UserControlParser.cs
- XmlValidatingReader.cs
- TreeNodeCollectionEditor.cs
- BinaryObjectReader.cs
- MemoryFailPoint.cs
- HttpCapabilitiesBase.cs
- Blend.cs
- Condition.cs
- ConfigXmlSignificantWhitespace.cs
- AsymmetricSignatureFormatter.cs
- HtmlTableCell.cs
- HttpPostProtocolReflector.cs
- XDRSchema.cs
- EntryIndex.cs
- BitmapEffectRenderDataResource.cs
- TraceLevelStore.cs
- RadioButtonRenderer.cs
- XmlSchemaDocumentation.cs
- SecurityDescriptor.cs
- ObjectViewFactory.cs
- XamlPoint3DCollectionSerializer.cs
- ObjectDataSourceSelectingEventArgs.cs
- BamlResourceDeserializer.cs
- DecoratedNameAttribute.cs
- TextBoxAutoCompleteSourceConverter.cs
- DataObjectSettingDataEventArgs.cs
- NameSpaceEvent.cs
- GridPattern.cs
- Line.cs
- NavigateEvent.cs
- SoapFormatter.cs
- SqlDataSourceSelectingEventArgs.cs
- IsolatedStoragePermission.cs
- ColumnCollection.cs
- SplineQuaternionKeyFrame.cs
- ReadOnlyHierarchicalDataSourceView.cs
- Simplifier.cs
- GridViewCommandEventArgs.cs
- ButtonFieldBase.cs
- BitmapEffectGroup.cs
- DateTimeEditor.cs
- ParserStreamGeometryContext.cs
- MatrixUtil.cs
- StatusStrip.cs
- ImagingCache.cs
- GridViewRowPresenterBase.cs
- CacheMode.cs
- XmlEnumAttribute.cs
- PlanCompiler.cs
- XhtmlBasicPhoneCallAdapter.cs
- ToolStripSystemRenderer.cs
- LiteralText.cs
- Style.cs
- SelectedCellsCollection.cs
- XmlChoiceIdentifierAttribute.cs
- _NestedSingleAsyncResult.cs
- VirtualDirectoryMappingCollection.cs
- ImagingCache.cs
- SqlNamer.cs
- ProcessHostServerConfig.cs
- BitmapEffectGeneralTransform.cs
- IntSecurity.cs
- TextTrailingCharacterEllipsis.cs
- DataControlFieldCell.cs
- VirtualizedCellInfoCollection.cs
- ConfigurationConverterBase.cs
- ReadOnlyCollectionBase.cs
- EmptyQuery.cs
- UIElement.cs
- QilName.cs
- DataGridViewHitTestInfo.cs
- ItemCollection.cs
- MetaModel.cs
- EditingCommands.cs
- NameTable.cs
- SessionSymmetricTransportSecurityProtocolFactory.cs
- ScrollBarAutomationPeer.cs
- NamedPermissionSet.cs
- Stack.cs