Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / wpf / src / Core / CSharp / 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. //------------------------------------------------------------------------------ // 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
- SqlLiftWhereClauses.cs
- _RequestCacheProtocol.cs
- FormCollection.cs
- ReferenceSchema.cs
- SqlCommandSet.cs
- HoistedLocals.cs
- TypedTableBase.cs
- HttpProfileBase.cs
- TableItemProviderWrapper.cs
- WebPartConnectionsConfigureVerb.cs
- DataBoundControlDesigner.cs
- InfoCardSymmetricCrypto.cs
- StrongNamePublicKeyBlob.cs
- NonVisualControlAttribute.cs
- SapiGrammar.cs
- ProtectedProviderSettings.cs
- PropertyCollection.cs
- WebPartConnectionsConfigureVerb.cs
- Baml2006KnownTypes.cs
- GridLength.cs
- SecureStringHasher.cs
- FormsAuthenticationModule.cs
- BaseInfoTable.cs
- DesignerVerbCollection.cs
- codemethodreferenceexpression.cs
- BindingCollection.cs
- HtmlControlPersistable.cs
- TargetPerspective.cs
- OleStrCAMarshaler.cs
- DSASignatureDeformatter.cs
- BasicExpressionVisitor.cs
- QuotaExceededException.cs
- DiagnosticStrings.cs
- XPathChildIterator.cs
- COM2IProvidePropertyBuilderHandler.cs
- DocumentViewerBaseAutomationPeer.cs
- SystemColors.cs
- LambdaCompiler.Logical.cs
- ListViewGroupCollectionEditor.cs
- ScriptIgnoreAttribute.cs
- WebPartHeaderCloseVerb.cs
- SoapAttributeOverrides.cs
- SequentialWorkflowHeaderFooter.cs
- entityreference_tresulttype.cs
- ReceiveReply.cs
- Size3DValueSerializer.cs
- TextFormatterContext.cs
- WebUtil.cs
- PropertyItemInternal.cs
- DateTimeUtil.cs
- BulletedListEventArgs.cs
- LabelTarget.cs
- AssertHelper.cs
- XmlIlGenerator.cs
- DataColumn.cs
- EntityConnection.cs
- CompilationLock.cs
- PointKeyFrameCollection.cs
- Array.cs
- DropSourceBehavior.cs
- ChangePassword.cs
- DateTimeFormatInfoScanner.cs
- NamedObject.cs
- SimpleWorkerRequest.cs
- XAMLParseException.cs
- IsolatedStorageException.cs
- HttpHandler.cs
- MetadataFile.cs
- ISO2022Encoding.cs
- SchemaNames.cs
- CodeIterationStatement.cs
- ItemCollection.cs
- HandlerBase.cs
- TextTreeTextElementNode.cs
- ParsedAttributeCollection.cs
- BaseCAMarshaler.cs
- ScriptingJsonSerializationSection.cs
- ViewGenResults.cs
- CollectionContainer.cs
- DbMetaDataColumnNames.cs
- RectangleF.cs
- ActivityCodeDomSerializer.cs
- BamlStream.cs
- Utilities.cs
- CodeDomConfigurationHandler.cs
- CalendarSelectionChangedEventArgs.cs
- ISAPIRuntime.cs
- PriorityQueue.cs
- VectorCollectionConverter.cs
- SHA256Managed.cs
- LogPolicy.cs
- PolyBezierSegmentFigureLogic.cs
- UpdatePanel.cs
- CollectionType.cs
- PropertyChangedEventArgs.cs
- odbcmetadatafactory.cs
- DataRow.cs
- StylusEventArgs.cs
- WindowsTooltip.cs
- PolygonHotSpot.cs