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
- SiteMapPath.cs
- InputBuffer.cs
- ParameterModifier.cs
- XhtmlMobileTextWriter.cs
- BmpBitmapDecoder.cs
- VSWCFServiceContractGenerator.cs
- CompilationSection.cs
- ActivationWorker.cs
- ElementHostAutomationPeer.cs
- UidPropertyAttribute.cs
- FlowDocumentReaderAutomationPeer.cs
- Effect.cs
- XmlIlGenerator.cs
- PenThreadWorker.cs
- RegexCompilationInfo.cs
- SettingsPropertyValueCollection.cs
- DataGridColumnCollectionEditor.cs
- OracleCommandSet.cs
- TemplateBamlTreeBuilder.cs
- DataGridViewSelectedCellCollection.cs
- SqlParameterCollection.cs
- SqlFactory.cs
- SafeCryptoHandles.cs
- RuleAttributes.cs
- LinqDataSourceSelectEventArgs.cs
- HandledEventArgs.cs
- AuthenticationService.cs
- Serializer.cs
- XXXInfos.cs
- SafeFileMappingHandle.cs
- InfiniteTimeSpanConverter.cs
- BrushConverter.cs
- SimpleWorkerRequest.cs
- SHA384Cng.cs
- EntityCommandCompilationException.cs
- LeftCellWrapper.cs
- ListControlActionList.cs
- Comparer.cs
- ObjectDataSourceMethodEventArgs.cs
- DiscoveryMessageProperty.cs
- DirectoryObjectSecurity.cs
- DataGridViewLinkColumn.cs
- RegexParser.cs
- CriticalFinalizerObject.cs
- VisualStates.cs
- RegexNode.cs
- FormViewPageEventArgs.cs
- EditCommandColumn.cs
- ComPlusSynchronizationContext.cs
- ProtocolsSection.cs
- _NTAuthentication.cs
- XamlValidatingReader.cs
- MergablePropertyAttribute.cs
- WpfSharedXamlSchemaContext.cs
- QuinticEase.cs
- TdsParser.cs
- QilTypeChecker.cs
- XamlSerializerUtil.cs
- TextControlDesigner.cs
- DodSequenceMerge.cs
- Debug.cs
- SqlClientMetaDataCollectionNames.cs
- ContractCodeDomInfo.cs
- ObjectPropertyMapping.cs
- SQLStringStorage.cs
- BaseUriWithWildcard.cs
- RuleProcessor.cs
- FillBehavior.cs
- LambdaCompiler.Logical.cs
- MetadataReference.cs
- PartialList.cs
- ByteStream.cs
- ClientSideQueueItem.cs
- SortExpressionBuilder.cs
- UrlAuthorizationModule.cs
- _ReceiveMessageOverlappedAsyncResult.cs
- SwitchLevelAttribute.cs
- UIElementParagraph.cs
- InstanceLockQueryResult.cs
- TrackingProfile.cs
- EndpointAddress.cs
- SimpleColumnProvider.cs
- CompilerState.cs
- CodeSnippetTypeMember.cs
- MarshalByRefObject.cs
- ExceptionTrace.cs
- HtmlElementErrorEventArgs.cs
- LicenseManager.cs
- StreamAsIStream.cs
- MenuItemStyle.cs
- FixedPageProcessor.cs
- RequestUriProcessor.cs
- Command.cs
- ServiceElement.cs
- DiscoveryMessageSequence11.cs
- TabControlToolboxItem.cs
- X509ChainPolicy.cs
- IDictionary.cs
- OSFeature.cs
- Geometry3D.cs