Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / wpf / src / Core / CSharp / MS / Internal / Ink / StrokeNodeData.cs / 1 / StrokeNodeData.cs
//------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------- using System; using System.Collections.Generic; using System.Windows; using System.Windows.Media; using System.Windows.Input; using System.Diagnostics; namespace MS.Internal.Ink { #region StrokeNodeData ////// This structure represents a node on a stroke spine. /// internal struct StrokeNodeData { #region Statics private static StrokeNodeData s_empty = new StrokeNodeData(); #endregion #region API (internal) ///Returns static object representing an unitialized node internal static StrokeNodeData Empty { get { return s_empty; } } ////// Constructor for nodes of a pressure insensitive stroke /// /// position of the node internal StrokeNodeData(Point position) { _position = position; _pressure = 1; } ////// Constructor for nodes with pressure data /// /// position of the node /// pressure scaling factor at the node internal StrokeNodeData(Point position, float pressure) { System.Diagnostics.Debug.Assert(DoubleUtil.GreaterThan((double)pressure, 0d)); _position = position; _pressure = pressure; } ///Tells whether the structre was properly initialized internal bool IsEmpty { get { Debug.Assert(DoubleUtil.AreClose(0, s_empty._pressure)); return DoubleUtil.AreClose(_pressure, s_empty._pressure); } } ///Position of the node internal Point Position { get { return _position; } } ///Pressure scaling factor at the node internal float PressureFactor { get { return _pressure; } } #endregion #region Privates private Point _position; private float _pressure; #endregion } #endregion } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------- using System; using System.Collections.Generic; using System.Windows; using System.Windows.Media; using System.Windows.Input; using System.Diagnostics; namespace MS.Internal.Ink { #region StrokeNodeData ////// This structure represents a node on a stroke spine. /// internal struct StrokeNodeData { #region Statics private static StrokeNodeData s_empty = new StrokeNodeData(); #endregion #region API (internal) ///Returns static object representing an unitialized node internal static StrokeNodeData Empty { get { return s_empty; } } ////// Constructor for nodes of a pressure insensitive stroke /// /// position of the node internal StrokeNodeData(Point position) { _position = position; _pressure = 1; } ////// Constructor for nodes with pressure data /// /// position of the node /// pressure scaling factor at the node internal StrokeNodeData(Point position, float pressure) { System.Diagnostics.Debug.Assert(DoubleUtil.GreaterThan((double)pressure, 0d)); _position = position; _pressure = pressure; } ///Tells whether the structre was properly initialized internal bool IsEmpty { get { Debug.Assert(DoubleUtil.AreClose(0, s_empty._pressure)); return DoubleUtil.AreClose(_pressure, s_empty._pressure); } } ///Position of the node internal Point Position { get { return _position; } } ///Pressure scaling factor at the node internal float PressureFactor { get { return _pressure; } } #endregion #region Privates private Point _position; private float _pressure; #endregion } #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
- Trace.cs
- CommandConverter.cs
- LookupNode.cs
- TextRangeBase.cs
- XPathArrayIterator.cs
- StubHelpers.cs
- InternalDuplexChannelFactory.cs
- ReaderContextStackData.cs
- URLIdentityPermission.cs
- CreateUserWizardDesigner.cs
- WorkflowNamespace.cs
- ComplexBindingPropertiesAttribute.cs
- WindowsNonControl.cs
- MonitoringDescriptionAttribute.cs
- ClientType.cs
- StylusPointProperties.cs
- DataGridViewHeaderCell.cs
- StreamWriter.cs
- BindingOperations.cs
- GlyphingCache.cs
- ColumnBinding.cs
- OverrideMode.cs
- BoolLiteral.cs
- Rijndael.cs
- StreamSecurityUpgradeAcceptorAsyncResult.cs
- JournalEntryStack.cs
- TreeNodeCollectionEditor.cs
- NotificationContext.cs
- Input.cs
- PipelineModuleStepContainer.cs
- FileLogRecordHeader.cs
- DelayedRegex.cs
- DeclarationUpdate.cs
- SchemaSetCompiler.cs
- AsymmetricSignatureDeformatter.cs
- DataObject.cs
- NumberFunctions.cs
- XmlCharCheckingReader.cs
- PolicyReader.cs
- mansign.cs
- sqlser.cs
- mactripleDES.cs
- Comparer.cs
- WeakReferenceEnumerator.cs
- SystemIcmpV4Statistics.cs
- TextElementCollection.cs
- AliasedExpr.cs
- UniqueConstraint.cs
- GB18030Encoding.cs
- HttpErrorTraceRecord.cs
- NegotiationTokenAuthenticatorStateCache.cs
- QilFunction.cs
- DataBoundControlActionList.cs
- SqlErrorCollection.cs
- SoapReflector.cs
- WebConvert.cs
- ResizeGrip.cs
- WebPart.cs
- TextRunTypographyProperties.cs
- InternalBufferOverflowException.cs
- PropertyGridEditorPart.cs
- IisTraceWebEventProvider.cs
- FormViewPagerRow.cs
- DesignTimeVisibleAttribute.cs
- CookielessHelper.cs
- ZipIOLocalFileHeader.cs
- VirtualPathUtility.cs
- WindowsEditBoxRange.cs
- DataSourceGroupCollection.cs
- Style.cs
- DiscoveryProxy.cs
- BitmapEffectCollection.cs
- DataBindEngine.cs
- CollectionView.cs
- VisualTreeUtils.cs
- CodeCommentStatement.cs
- ConnectionStringsExpressionBuilder.cs
- MergablePropertyAttribute.cs
- DataObjectEventArgs.cs
- LoginCancelEventArgs.cs
- ObjectDataSourceEventArgs.cs
- TypeConverterValueSerializer.cs
- Cast.cs
- GeneralTransform3DTo2D.cs
- LinkedResourceCollection.cs
- BitmapEffectGeneralTransform.cs
- Transform3D.cs
- FixedSOMSemanticBox.cs
- DataGridViewCellEventArgs.cs
- PlaceHolder.cs
- ClrPerspective.cs
- XmlWellformedWriter.cs
- PropertyTabAttribute.cs
- RadioButtonBaseAdapter.cs
- TransformGroup.cs
- SmiContextFactory.cs
- UITypeEditor.cs
- CodeTypeMemberCollection.cs
- ListBoxAutomationPeer.cs
- StringArrayConverter.cs