Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / 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
- SessionEndingCancelEventArgs.cs
- DataSysAttribute.cs
- FixedTextContainer.cs
- Message.cs
- WizardSideBarListControlItemEventArgs.cs
- ToolboxItemSnapLineBehavior.cs
- ProxyElement.cs
- Page.cs
- DllHostedComPlusServiceHost.cs
- SiteMapNodeItem.cs
- OptimizerPatterns.cs
- DrawingAttributes.cs
- UIElement3D.cs
- CqlQuery.cs
- DataGridViewColumnEventArgs.cs
- ElapsedEventArgs.cs
- ApplicationHost.cs
- DynamicPropertyReader.cs
- PagePropertiesChangingEventArgs.cs
- TreeWalker.cs
- EventRouteFactory.cs
- CodeSubDirectoriesCollection.cs
- PageSettings.cs
- AnalyzedTree.cs
- WebPartExportVerb.cs
- CodeGeneratorOptions.cs
- MediaScriptCommandRoutedEventArgs.cs
- graph.cs
- NamespaceExpr.cs
- InertiaExpansionBehavior.cs
- CaseInsensitiveHashCodeProvider.cs
- TraceUtils.cs
- StatusBarItemAutomationPeer.cs
- SettingsBindableAttribute.cs
- DataServiceQueryException.cs
- WorkflowDesignerMessageFilter.cs
- NonVisualControlAttribute.cs
- XmlSchemaNotation.cs
- HttpWebRequest.cs
- MsmqIntegrationSecurityMode.cs
- TcpChannelFactory.cs
- UnknownBitmapDecoder.cs
- WindowsImpersonationContext.cs
- CancelEventArgs.cs
- UpdateException.cs
- RichTextBoxAutomationPeer.cs
- BitmapPalettes.cs
- IsolatedStorageFile.cs
- CustomValidator.cs
- XmlSchemaSimpleTypeRestriction.cs
- EnterpriseServicesHelper.cs
- DataGridViewToolTip.cs
- CollectionMarkupSerializer.cs
- TdsParameterSetter.cs
- MasterPageParser.cs
- GregorianCalendar.cs
- ConnectionStringSettingsCollection.cs
- DeviceSpecific.cs
- RuleSettings.cs
- OleDbConnectionPoolGroupProviderInfo.cs
- MultipleViewPatternIdentifiers.cs
- NameScope.cs
- Polyline.cs
- NavigationHelper.cs
- DoubleCollectionValueSerializer.cs
- DecimalKeyFrameCollection.cs
- MetafileHeader.cs
- PriorityQueue.cs
- SamlSubjectStatement.cs
- EventDescriptorCollection.cs
- UInt16.cs
- RawTextInputReport.cs
- DbProviderFactories.cs
- InvalidContentTypeException.cs
- AdapterDictionary.cs
- mda.cs
- KeyboardDevice.cs
- Viewport2DVisual3D.cs
- WpfKnownType.cs
- Page.cs
- EffectiveValueEntry.cs
- DataGridViewRowStateChangedEventArgs.cs
- DefaultMemberAttribute.cs
- DataRecordInfo.cs
- BitmapEffectInput.cs
- SoapAttributeAttribute.cs
- RectAnimation.cs
- ProcessHostFactoryHelper.cs
- XmlSchemaAll.cs
- FamilyCollection.cs
- PlacementWorkspace.cs
- NotifyParentPropertyAttribute.cs
- GridProviderWrapper.cs
- InternalBase.cs
- EdmMember.cs
- SecurityElement.cs
- MemoryPressure.cs
- AncestorChangedEventArgs.cs
- ControlPropertyNameConverter.cs
- XmlDownloadManager.cs