Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Core / CSharp / MS / Internal / Ink / StrokeNodeData.cs / 1305600 / 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- EventLevel.cs
- _SafeNetHandles.cs
- ToolboxItem.cs
- ToolStripContainerDesigner.cs
- serverconfig.cs
- IndentedWriter.cs
- MaskedTextProvider.cs
- CompositeActivityValidator.cs
- ThousandthOfEmRealPoints.cs
- GACIdentityPermission.cs
- IncrementalCompileAnalyzer.cs
- TextRange.cs
- ShaderEffect.cs
- MetafileHeaderEmf.cs
- UIntPtr.cs
- InteropTrackingRecord.cs
- RestHandler.cs
- DataControlPagerLinkButton.cs
- ControlAdapter.cs
- WebRequestModuleElementCollection.cs
- BackStopAuthenticationModule.cs
- WorkflowItemPresenter.cs
- DesignerVerb.cs
- UnaryNode.cs
- TextBox.cs
- DynamicScriptObject.cs
- DataSetFieldSchema.cs
- ClientSettingsSection.cs
- DbProviderServices.cs
- TablePattern.cs
- TextBoxBase.cs
- InputLanguageCollection.cs
- WithParamAction.cs
- StringKeyFrameCollection.cs
- SerTrace.cs
- GestureRecognitionResult.cs
- CorrelationValidator.cs
- TraceHelpers.cs
- processwaithandle.cs
- SemanticBasicElement.cs
- TemplatedAdorner.cs
- HandlerWithFactory.cs
- UInt16Storage.cs
- DocumentSchemaValidator.cs
- DiscreteKeyFrames.cs
- CharacterString.cs
- SourceCollection.cs
- GeneralTransform3DCollection.cs
- InvalidProgramException.cs
- DataGridViewLinkColumn.cs
- DbMetaDataColumnNames.cs
- GeometryGroup.cs
- OutputWindow.cs
- ParserStreamGeometryContext.cs
- ImageList.cs
- TailPinnedEventArgs.cs
- base64Transforms.cs
- FileAuthorizationModule.cs
- UInt64Storage.cs
- EdmItemError.cs
- Binding.cs
- WebUtil.cs
- Viewport3DAutomationPeer.cs
- NonBatchDirectoryCompiler.cs
- OrderablePartitioner.cs
- ModelServiceImpl.cs
- ComplexObject.cs
- TableAutomationPeer.cs
- TypeValidationEventArgs.cs
- ErrorFormatterPage.cs
- InfoCardRequestException.cs
- BStrWrapper.cs
- BinaryKeyIdentifierClause.cs
- Accessors.cs
- RemoveStoryboard.cs
- CustomSignedXml.cs
- EditorBrowsableAttribute.cs
- ECDiffieHellman.cs
- SoapRpcMethodAttribute.cs
- TileBrush.cs
- TypedDataSourceCodeGenerator.cs
- ArgumentException.cs
- ObjectView.cs
- BitmapEffectGeneralTransform.cs
- AttributeCollection.cs
- Stylus.cs
- TargetConverter.cs
- EncryptedPackageFilter.cs
- TransformPattern.cs
- Classification.cs
- ToolStripSystemRenderer.cs
- DataFormats.cs
- HGlobalSafeHandle.cs
- TrackingMemoryStreamFactory.cs
- DataContractJsonSerializerOperationFormatter.cs
- CompiledQueryCacheEntry.cs
- XmlSerializer.cs
- CodeAccessSecurityEngine.cs
- updateconfighost.cs
- XmlSchemaInclude.cs