Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Core / CSharp / System / Windows / Media / LineSegment.cs / 1305600 / 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
- XmlSchemaRedefine.cs
- ToolStripManager.cs
- Int16AnimationBase.cs
- Base64Decoder.cs
- ConfigUtil.cs
- EmptyElement.cs
- ThreadExceptionDialog.cs
- IsolatedStorageFileStream.cs
- BaseValidatorDesigner.cs
- basevalidator.cs
- SinglePhaseEnlistment.cs
- Hash.cs
- DependencyProperty.cs
- Part.cs
- ServiceHostingEnvironment.cs
- KnownBoxes.cs
- DataRecordObjectView.cs
- AdornerHitTestResult.cs
- XmlHelper.cs
- WebScriptEnablingElement.cs
- TrackingMemoryStream.cs
- LayoutExceptionEventArgs.cs
- SectionInput.cs
- NameValuePair.cs
- UserControlBuildProvider.cs
- ColorConverter.cs
- GridViewEditEventArgs.cs
- DataListItemCollection.cs
- WebPartHeaderCloseVerb.cs
- OutgoingWebRequestContext.cs
- WsdlImporter.cs
- DbProviderManifest.cs
- CallbackException.cs
- ObjectViewEntityCollectionData.cs
- SystemGatewayIPAddressInformation.cs
- MessageBox.cs
- ThreadInterruptedException.cs
- DataConnectionHelper.cs
- DoubleKeyFrameCollection.cs
- CodeEntryPointMethod.cs
- ConstructorArgumentAttribute.cs
- ColumnHeaderCollectionEditor.cs
- StringUtil.cs
- DbMetaDataColumnNames.cs
- ObjectPersistData.cs
- FormsAuthenticationCredentials.cs
- StructureChangedEventArgs.cs
- NameValueFileSectionHandler.cs
- HtmlContainerControl.cs
- AttachedPropertyBrowsableForTypeAttribute.cs
- SmtpNegotiateAuthenticationModule.cs
- DbConnectionHelper.cs
- CompiledRegexRunnerFactory.cs
- DataTemplateKey.cs
- QilStrConcat.cs
- FormsAuthenticationModule.cs
- DefaultAsyncDataDispatcher.cs
- Stack.cs
- AddInIpcChannel.cs
- StringReader.cs
- Site.cs
- ProfessionalColors.cs
- PeerCollaborationPermission.cs
- MobileRedirect.cs
- SQLConvert.cs
- HtmlTextArea.cs
- Geometry3D.cs
- DataFormat.cs
- TextSimpleMarkerProperties.cs
- DateTimeOffsetConverter.cs
- ServiceNameCollection.cs
- ObjectListGeneralPage.cs
- TargetConverter.cs
- DependencyPropertyValueSerializer.cs
- Animatable.cs
- MultiBinding.cs
- NgenServicingAttributes.cs
- LocatorPart.cs
- RelationshipEndMember.cs
- SafeFreeMibTable.cs
- TimerTable.cs
- WebPartDisplayModeCancelEventArgs.cs
- Util.cs
- XmlSchemaSet.cs
- FilterElement.cs
- RuntimeConfig.cs
- TaiwanCalendar.cs
- StickyNoteAnnotations.cs
- MissingSatelliteAssemblyException.cs
- DesignerSerializationOptionsAttribute.cs
- FixedPosition.cs
- RemoveStoryboard.cs
- ToolBar.cs
- EdmType.cs
- TransformationRules.cs
- ActivityPreviewDesigner.cs
- DbCommandDefinition.cs
- TreeView.cs
- CodeCompiler.cs
- SessionStateModule.cs