Code:
/ DotNET / DotNET / 8.0 / untmp / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / Core / 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- DBConnectionString.cs
- CodeDomComponentSerializationService.cs
- SiteMembershipCondition.cs
- WinInetCache.cs
- HtmlCalendarAdapter.cs
- BaseValidator.cs
- ModulesEntry.cs
- TransactionProtocol.cs
- DataGridViewColumnEventArgs.cs
- Table.cs
- Variant.cs
- PropertyBuilder.cs
- DataTablePropertyDescriptor.cs
- XmlLoader.cs
- SystemColors.cs
- AdPostCacheSubstitution.cs
- SqlParameterCollection.cs
- DataControlFieldCell.cs
- CollectionsUtil.cs
- EventInfo.cs
- ToolStripPanel.cs
- XPathChildIterator.cs
- __ComObject.cs
- KeyGestureConverter.cs
- _SslStream.cs
- Preprocessor.cs
- HandlerFactoryCache.cs
- SafeEventHandle.cs
- ExpressionBindingCollection.cs
- TemplateKeyConverter.cs
- IInstanceTable.cs
- EventDescriptor.cs
- TextParaLineResult.cs
- Variant.cs
- StylusShape.cs
- AutomationPatternInfo.cs
- BigInt.cs
- ConsumerConnectionPointCollection.cs
- DateTimeFormat.cs
- TemplateBindingExtensionConverter.cs
- ResourceProperty.cs
- TextBlockAutomationPeer.cs
- ClientTargetCollection.cs
- StrongNameHelpers.cs
- TreeNodeMouseHoverEvent.cs
- _NegotiateClient.cs
- ThemeInfoAttribute.cs
- XmlValidatingReaderImpl.cs
- _Win32.cs
- SByteConverter.cs
- XmlAnyElementAttributes.cs
- RegexCompilationInfo.cs
- Binding.cs
- TextOptionsInternal.cs
- MediaPlayer.cs
- WebControlsSection.cs
- WindowsTab.cs
- _NegotiateClient.cs
- TextHidden.cs
- SystemUdpStatistics.cs
- PropertyChangedEventArgs.cs
- ScriptingJsonSerializationSection.cs
- JournalEntry.cs
- InternalBufferOverflowException.cs
- PropertyTabAttribute.cs
- PassportIdentity.cs
- HostVisual.cs
- ExpressionQuoter.cs
- TypeReference.cs
- ProviderConnectionPoint.cs
- TargetControlTypeAttribute.cs
- RemotingAttributes.cs
- CodeSnippetCompileUnit.cs
- XamlFigureLengthSerializer.cs
- SafeFileMappingHandle.cs
- SafeArrayRankMismatchException.cs
- NoneExcludedImageIndexConverter.cs
- EntityStoreSchemaGenerator.cs
- Vector3D.cs
- WebPartZoneBase.cs
- HtmlInputRadioButton.cs
- EntityModelSchemaGenerator.cs
- InkSerializer.cs
- ReferenceConverter.cs
- GenericIdentity.cs
- DbConnectionPool.cs
- SystemUdpStatistics.cs
- HttpResponseInternalWrapper.cs
- WebSysDefaultValueAttribute.cs
- CounterSetInstanceCounterDataSet.cs
- PersonalizablePropertyEntry.cs
- RootNamespaceAttribute.cs
- HitTestWithGeometryDrawingContextWalker.cs
- ScriptManager.cs
- DatagridviewDisplayedBandsData.cs
- DataFormats.cs
- TemplatingOptionsDialog.cs
- DictionaryBase.cs
- Version.cs
- CryptoConfig.cs