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
- _SslSessionsCache.cs
- BuildResultCache.cs
- GeometryGroup.cs
- DelegatingStream.cs
- Preprocessor.cs
- CommandDevice.cs
- ToolStripSystemRenderer.cs
- MailDefinitionBodyFileNameEditor.cs
- TreeIterator.cs
- DataRowCollection.cs
- UIPropertyMetadata.cs
- ParenthesizePropertyNameAttribute.cs
- SettingsPropertyValue.cs
- GuidelineCollection.cs
- GradientBrush.cs
- TagPrefixAttribute.cs
- ProfileSection.cs
- WasAdminWrapper.cs
- ModelUtilities.cs
- ContainerSelectorGlyph.cs
- _LocalDataStoreMgr.cs
- ImageIndexConverter.cs
- XPathDocumentBuilder.cs
- DataGridViewCheckBoxCell.cs
- MsmqDecodeHelper.cs
- EmptyReadOnlyDictionaryInternal.cs
- Enum.cs
- WebPartTransformerCollection.cs
- CollectionType.cs
- ListMarkerSourceInfo.cs
- ThemeDirectoryCompiler.cs
- GridViewSortEventArgs.cs
- ConfigXmlText.cs
- SocketPermission.cs
- WindowsPrincipal.cs
- VBIdentifierNameEditor.cs
- CompiledQueryCacheEntry.cs
- _ScatterGatherBuffers.cs
- ApplicationInfo.cs
- TemplateManager.cs
- DbProviderSpecificTypePropertyAttribute.cs
- ResizingMessageFilter.cs
- Button.cs
- ImplicitInputBrush.cs
- SoapSchemaExporter.cs
- DataRecordInternal.cs
- GridSplitterAutomationPeer.cs
- ProcessInfo.cs
- RegistryPermission.cs
- EntityViewGenerator.cs
- DbFunctionCommandTree.cs
- TaskScheduler.cs
- PhysicalFontFamily.cs
- ChtmlCommandAdapter.cs
- DivideByZeroException.cs
- AnnotationResourceChangedEventArgs.cs
- WebPartHeaderCloseVerb.cs
- WindowsComboBox.cs
- WebPartVerb.cs
- WpfKnownMember.cs
- BaseTreeIterator.cs
- XmlDocumentFragment.cs
- MetadataCache.cs
- SettingsPropertyCollection.cs
- XmlChildEnumerator.cs
- DriveInfo.cs
- PersonalizationDictionary.cs
- VisualStyleElement.cs
- HighlightComponent.cs
- StreamWriter.cs
- Models.cs
- Convert.cs
- DataGridViewRowStateChangedEventArgs.cs
- Span.cs
- EventHandlerList.cs
- VisualTreeUtils.cs
- MachineKeyValidationConverter.cs
- ConfigurationManagerInternalFactory.cs
- XpsFilter.cs
- FormCollection.cs
- DataRowView.cs
- BamlCollectionHolder.cs
- AmbientLight.cs
- InteropBitmapSource.cs
- WmlTextBoxAdapter.cs
- NativeWrapper.cs
- FamilyMap.cs
- ReflectionTypeLoadException.cs
- BitmapFrameDecode.cs
- NullRuntimeConfig.cs
- XamlVector3DCollectionSerializer.cs
- ToolboxItem.cs
- RenamedEventArgs.cs
- DirectoryInfo.cs
- XmlILOptimizerVisitor.cs
- StateMachineWorkflow.cs
- AsyncDataRequest.cs
- PenThreadPool.cs
- CachedPathData.cs
- StylusPointPropertyId.cs