Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / 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
- DocumentApplicationDocumentViewer.cs
- TableLayoutPanelCellPosition.cs
- CipherData.cs
- WebRequest.cs
- TraceContext.cs
- BitmapEffectDrawingContent.cs
- CodeTypeParameter.cs
- AsymmetricSecurityBindingElement.cs
- XmlBinaryReader.cs
- FontEditor.cs
- TransformerInfoCollection.cs
- ConnectionStringSettingsCollection.cs
- DataServiceStreamResponse.cs
- KerberosSecurityTokenProvider.cs
- BehaviorEditorPart.cs
- OdbcConnectionString.cs
- GraphicsPath.cs
- SRGSCompiler.cs
- TypeSystemHelpers.cs
- OracleTimeSpan.cs
- WindowShowOrOpenTracker.cs
- RNGCryptoServiceProvider.cs
- CompModSwitches.cs
- RepeaterCommandEventArgs.cs
- RecognizedWordUnit.cs
- MetadataHelper.cs
- EncryptedKeyIdentifierClause.cs
- SequentialOutput.cs
- XmlSchemaAttributeGroupRef.cs
- PropertyEmitter.cs
- RoutingEndpointTrait.cs
- DbProviderFactories.cs
- OdbcEnvironmentHandle.cs
- AsynchronousChannel.cs
- _Rfc2616CacheValidators.cs
- XmlSchemaComplexType.cs
- x509store.cs
- _ProxyRegBlob.cs
- ViewCellRelation.cs
- PassportAuthenticationModule.cs
- SendMessageChannelCache.cs
- XmlUtf8RawTextWriter.cs
- RegisteredScript.cs
- ExpressionBuilder.cs
- CodeStatementCollection.cs
- Constants.cs
- TdsParserSafeHandles.cs
- MenuBase.cs
- ToolboxCategory.cs
- ObjectSet.cs
- IFormattable.cs
- ArcSegment.cs
- RecognizeCompletedEventArgs.cs
- XMLUtil.cs
- BufferModeSettings.cs
- BlockExpression.cs
- LoginView.cs
- TemplateEditingVerb.cs
- SmtpReplyReader.cs
- EncodingInfo.cs
- TextServicesContext.cs
- CollaborationHelperFunctions.cs
- OdbcCommand.cs
- Int16AnimationUsingKeyFrames.cs
- ChannelServices.cs
- SoapInteropTypes.cs
- RepeaterItemEventArgs.cs
- WSHttpSecurityElement.cs
- IPHostEntry.cs
- PeerTransportListenAddressConverter.cs
- XPathAxisIterator.cs
- ChildrenQuery.cs
- BlurEffect.cs
- AssemblyFilter.cs
- WinEventHandler.cs
- FaultDescription.cs
- Animatable.cs
- ObjectViewEntityCollectionData.cs
- ObjectStorage.cs
- StyleCollectionEditor.cs
- UncommonField.cs
- ExtentJoinTreeNode.cs
- UpdatePanelTrigger.cs
- OutputCacheSettingsSection.cs
- EntityContainer.cs
- SqlServices.cs
- CheckPair.cs
- FixedElement.cs
- Selection.cs
- ApplicationTrust.cs
- MobileSysDescriptionAttribute.cs
- ChannelParameterCollection.cs
- SAPIEngineTypes.cs
- BindableTemplateBuilder.cs
- IPAddress.cs
- Single.cs
- TransactionFlowOption.cs
- Transform.cs
- PipeSecurity.cs
- ClassDataContract.cs