Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Core / CSharp / MS / Internal / Ink / StrokeNodeData.cs / 1305600 / 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
- TemplateManager.cs
- FormViewUpdatedEventArgs.cs
- ADMembershipUser.cs
- HttpProcessUtility.cs
- Pair.cs
- NullableFloatMinMaxAggregationOperator.cs
- UnsafeNativeMethods.cs
- Code.cs
- VarRefManager.cs
- LazyLoadBehavior.cs
- BitmapPalette.cs
- UserControlParser.cs
- XmlSchemaGroup.cs
- SqlBooleanMismatchVisitor.cs
- StrokeIntersection.cs
- Point4D.cs
- PassportAuthentication.cs
- AnnotationStore.cs
- DataObjectCopyingEventArgs.cs
- SrgsDocument.cs
- RuleSetDialog.cs
- DictionaryItemsCollection.cs
- InheritanceRules.cs
- RegistrationServices.cs
- InkCanvasAutomationPeer.cs
- HttpCacheVary.cs
- ParameterExpression.cs
- AttributeUsageAttribute.cs
- Config.cs
- SecurityElement.cs
- __Filters.cs
- SerialErrors.cs
- MultiSelector.cs
- TypeDescriptorFilterService.cs
- SqlDataSourceSelectingEventArgs.cs
- CatalogZoneBase.cs
- SrgsDocumentParser.cs
- ArgIterator.cs
- ScrollContentPresenter.cs
- ComponentResourceKeyConverter.cs
- SharedPerformanceCounter.cs
- HyperLink.cs
- DataIdProcessor.cs
- WindowsSysHeader.cs
- TableItemPattern.cs
- QuaternionConverter.cs
- Stylus.cs
- mongolianshape.cs
- TextElementEditingBehaviorAttribute.cs
- X509PeerCertificateElement.cs
- GenerateTemporaryTargetAssembly.cs
- DataRelationPropertyDescriptor.cs
- StateMachineHelpers.cs
- Compiler.cs
- DefaultValueAttribute.cs
- documentsequencetextpointer.cs
- CompositeActivityTypeDescriptor.cs
- CellPartitioner.cs
- EntitySqlQueryState.cs
- RowTypeElement.cs
- SamlDelegatingWriter.cs
- MD5.cs
- MouseWheelEventArgs.cs
- RoleGroupCollectionEditor.cs
- RoleServiceManager.cs
- XPathArrayIterator.cs
- LineServices.cs
- StylusCollection.cs
- DependencyObject.cs
- TypeConverter.cs
- QilCloneVisitor.cs
- ResourcePermissionBase.cs
- DataGridViewAdvancedBorderStyle.cs
- SQLUtility.cs
- Resources.Designer.cs
- ServiceDeploymentInfo.cs
- WindowHelperService.cs
- SystemInformation.cs
- securitycriticaldata.cs
- DeferredReference.cs
- Page.cs
- PointLight.cs
- StructureChangedEventArgs.cs
- DependencyPropertyHelper.cs
- HttpModulesSection.cs
- KnownTypes.cs
- sortedlist.cs
- Parser.cs
- SafeHandles.cs
- MouseGesture.cs
- DefaultTraceListener.cs
- TemplatedWizardStep.cs
- DocumentScope.cs
- CaseStatement.cs
- FlowDocumentPage.cs
- DataSourceHelper.cs
- StylusPointPropertyInfoDefaults.cs
- StringExpressionSet.cs
- SamlConditions.cs
- DataTableReaderListener.cs