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
- SQLGuidStorage.cs
- CookieProtection.cs
- BuildManagerHost.cs
- ReferencedCollectionType.cs
- XmlSerializerFactory.cs
- KoreanCalendar.cs
- DebugView.cs
- CompareValidator.cs
- BreakRecordTable.cs
- UserControlAutomationPeer.cs
- CompensationDesigner.cs
- GlobalEventManager.cs
- BoundPropertyEntry.cs
- LocalizationCodeDomSerializer.cs
- LingerOption.cs
- OdbcConnectionPoolProviderInfo.cs
- FileDialog.cs
- Mouse.cs
- MethodAccessException.cs
- TextBoxBase.cs
- TimeSpan.cs
- AuthenticationException.cs
- ProfilePropertyMetadata.cs
- SQLUtility.cs
- XmlSchemaAttribute.cs
- ApplicationDirectoryMembershipCondition.cs
- JoinGraph.cs
- ConstraintCollection.cs
- RestHandler.cs
- DelegatedStream.cs
- UrlPath.cs
- LinkDescriptor.cs
- DataTableReader.cs
- WebPartUtil.cs
- SqlDataSourceSelectingEventArgs.cs
- IssuanceLicense.cs
- EngineSiteSapi.cs
- KeyGestureValueSerializer.cs
- CachedTypeface.cs
- SessionIDManager.cs
- MemberAssignment.cs
- DataBindingCollectionEditor.cs
- COM2IDispatchConverter.cs
- Line.cs
- SrgsGrammarCompiler.cs
- FlowDocument.cs
- BitmapEffect.cs
- CodeExpressionRuleDeclaration.cs
- CharAnimationUsingKeyFrames.cs
- EpmSourcePathSegment.cs
- DataSourceListEditor.cs
- WindowsUpDown.cs
- SchemaNotation.cs
- TableLayout.cs
- SubordinateTransaction.cs
- ImageClickEventArgs.cs
- CacheEntry.cs
- EDesignUtil.cs
- X509Logo.cs
- AssociatedControlConverter.cs
- SocketElement.cs
- ChildTable.cs
- ResourceAssociationTypeEnd.cs
- OleDbMetaDataFactory.cs
- EtwTrace.cs
- SQLDouble.cs
- ServiceOperationParameter.cs
- ListQueryResults.cs
- SmtpFailedRecipientException.cs
- ToolStripContentPanelRenderEventArgs.cs
- CodeDomComponentSerializationService.cs
- ScriptIgnoreAttribute.cs
- DataGridViewAutoSizeColumnModeEventArgs.cs
- XmlILOptimizerVisitor.cs
- RectangleGeometry.cs
- UpdateManifestForBrowserApplication.cs
- GeneralTransform.cs
- MarkupExtensionReturnTypeAttribute.cs
- EtwTrackingBehavior.cs
- ResourceManager.cs
- SqlFileStream.cs
- FormViewInsertedEventArgs.cs
- IProducerConsumerCollection.cs
- AxisAngleRotation3D.cs
- RawStylusActions.cs
- PlatformCulture.cs
- HttpProfileGroupBase.cs
- BuildManagerHost.cs
- EntityTransaction.cs
- HttpServerVarsCollection.cs
- SynchronousReceiveElement.cs
- Cursors.cs
- UserUseLicenseDictionaryLoader.cs
- Light.cs
- GroupStyle.cs
- Underline.cs
- Journal.cs
- ContentPosition.cs
- TiffBitmapEncoder.cs
- EntityAdapter.cs