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
- ComponentDispatcherThread.cs
- METAHEADER.cs
- OracleDataReader.cs
- ProbeMatches11.cs
- DataControlField.cs
- Adorner.cs
- DataServiceHost.cs
- ReadOnlyDictionary.cs
- ScrollItemPattern.cs
- SourceFileInfo.cs
- WebPartEditorCancelVerb.cs
- exports.cs
- QueryCursorEventArgs.cs
- MenuBase.cs
- InvalidOperationException.cs
- DateTimeOffset.cs
- Assert.cs
- MultiDataTrigger.cs
- ForeignConstraint.cs
- ProxyWebPart.cs
- CodeStatement.cs
- ViewKeyConstraint.cs
- CaseInsensitiveOrdinalStringComparer.cs
- SrgsRule.cs
- TaiwanCalendar.cs
- OdbcError.cs
- OrderedDictionary.cs
- httpstaticobjectscollection.cs
- QilPatternVisitor.cs
- Nodes.cs
- AspNetSynchronizationContext.cs
- HttpListenerPrefixCollection.cs
- XPathBinder.cs
- DbConnectionStringCommon.cs
- ObjectSecurity.cs
- SchemaElementLookUpTable.cs
- XmlSigningNodeWriter.cs
- Page.cs
- SiteMapDataSourceView.cs
- AsymmetricKeyExchangeFormatter.cs
- IncrementalReadDecoders.cs
- OracleConnectionStringBuilder.cs
- OleDbConnectionInternal.cs
- XmlResolver.cs
- SnapshotChangeTrackingStrategy.cs
- KeyValueInternalCollection.cs
- DiscoveryDocumentReference.cs
- XmlText.cs
- CultureMapper.cs
- CommonDialog.cs
- SqlProfileProvider.cs
- ImageMap.cs
- ResetableIterator.cs
- ParameterReplacerVisitor.cs
- FormsAuthentication.cs
- FlowDocumentScrollViewer.cs
- ExceptionHandlers.cs
- FunctionNode.cs
- XmlCDATASection.cs
- CallContext.cs
- RepeaterItem.cs
- CompilerState.cs
- File.cs
- PropertyNames.cs
- ContextMenuService.cs
- ExceptionAggregator.cs
- SecurityHelper.cs
- HMACSHA1.cs
- Variable.cs
- EventData.cs
- DataGridViewColumnCollection.cs
- behaviorssection.cs
- NativeMethods.cs
- ApplicationSecurityManager.cs
- COM2ExtendedUITypeEditor.cs
- Transform3DGroup.cs
- UIAgentAsyncBeginRequest.cs
- KeyboardDevice.cs
- AngleUtil.cs
- TimelineCollection.cs
- PointCollectionValueSerializer.cs
- ScriptResourceInfo.cs
- coordinatorfactory.cs
- SqlBuilder.cs
- TextStore.cs
- ServiceMetadataContractBehavior.cs
- CellParagraph.cs
- GenericRootAutomationPeer.cs
- FrameworkTemplate.cs
- WebPartEditVerb.cs
- SqlCacheDependencyDatabase.cs
- TdsParserStateObject.cs
- NativeObjectSecurity.cs
- ModuleBuilder.cs
- AuditLevel.cs
- Journaling.cs
- DataControlFieldHeaderCell.cs
- TransformDescriptor.cs
- MetadataUtilsSmi.cs
- XamlReaderHelper.cs