Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / 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
- LinqDataSourceSelectEventArgs.cs
- AllMembershipCondition.cs
- KeyboardDevice.cs
- HTTPNotFoundHandler.cs
- SqlCachedBuffer.cs
- NameValueCollection.cs
- QueryException.cs
- _TimerThread.cs
- HttpHeaderCollection.cs
- WebHeaderCollection.cs
- TcpTransportBindingElement.cs
- CqlBlock.cs
- IDQuery.cs
- CookielessData.cs
- Brush.cs
- JulianCalendar.cs
- WebPartChrome.cs
- StateManagedCollection.cs
- CustomSignedXml.cs
- EdmFunction.cs
- InternalTypeHelper.cs
- TargetControlTypeCache.cs
- sortedlist.cs
- CubicEase.cs
- Interop.cs
- XamlFilter.cs
- XmlNodeList.cs
- XmlSchemaInferenceException.cs
- FactoryMaker.cs
- XmlNamedNodeMap.cs
- ComponentRenameEvent.cs
- TerminatingOperationBehavior.cs
- CallbackValidatorAttribute.cs
- BackgroundWorker.cs
- AudioFormatConverter.cs
- SqlDataRecord.cs
- DataGridViewRowsAddedEventArgs.cs
- FormClosedEvent.cs
- FileLogRecordEnumerator.cs
- RuleSettingsCollection.cs
- TextSelectionProcessor.cs
- Marshal.cs
- UnmanagedMemoryStream.cs
- TemplatedWizardStep.cs
- StrokeNodeOperations.cs
- UIElement3D.cs
- XPathBinder.cs
- HtmlTernaryTree.cs
- ObjectListTitleAttribute.cs
- AgileSafeNativeMemoryHandle.cs
- Page.cs
- NativeWindow.cs
- ExeContext.cs
- XmlAttributeOverrides.cs
- securitycriticaldataformultiplegetandset.cs
- WebMessageEncoderFactory.cs
- Label.cs
- UnauthorizedWebPart.cs
- ButtonChrome.cs
- PerformanceCounter.cs
- SignatureHelper.cs
- SqlClientWrapperSmiStreamChars.cs
- Rotation3D.cs
- _HeaderInfoTable.cs
- CollectionChange.cs
- HtmlInputFile.cs
- DataGridViewHeaderCell.cs
- View.cs
- ImageSource.cs
- CodeVariableDeclarationStatement.cs
- Volatile.cs
- WebPartTransformerAttribute.cs
- ValidationHelpers.cs
- SecurityCriticalDataForSet.cs
- BrowserDefinitionCollection.cs
- XmlTextReaderImpl.cs
- CrossAppDomainChannel.cs
- EmptyControlCollection.cs
- ConfigurationProperty.cs
- TemplatedWizardStep.cs
- DispatcherExceptionEventArgs.cs
- JsonQueryStringConverter.cs
- WebConfigurationManager.cs
- DocComment.cs
- ScriptReferenceEventArgs.cs
- ImageClickEventArgs.cs
- MULTI_QI.cs
- PermissionSetEnumerator.cs
- ReadOnlyObservableCollection.cs
- HashCodeCombiner.cs
- IteratorAsyncResult.cs
- ListViewGroupItemCollection.cs
- HtmlInputCheckBox.cs
- ConfigurationManagerInternalFactory.cs
- Empty.cs
- assemblycache.cs
- UpnEndpointIdentity.cs
- DesignTimeParseData.cs
- FileSystemInfo.cs
- GeometryDrawing.cs