Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / 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
- DES.cs
- ZipIOExtraFieldElement.cs
- XsltQilFactory.cs
- ListViewInsertedEventArgs.cs
- PointConverter.cs
- EventSourceCreationData.cs
- InkCanvasFeedbackAdorner.cs
- InvokeProviderWrapper.cs
- XhtmlBasicSelectionListAdapter.cs
- DelegateArgumentValue.cs
- IODescriptionAttribute.cs
- LicenseException.cs
- PersonalizationProviderHelper.cs
- FixedMaxHeap.cs
- MemberMemberBinding.cs
- DispatcherExceptionEventArgs.cs
- DataListCommandEventArgs.cs
- XmlAttributeAttribute.cs
- CodeCatchClauseCollection.cs
- StaticExtensionConverter.cs
- LayoutTable.cs
- ProviderSettings.cs
- SqlMetaData.cs
- PerfService.cs
- Function.cs
- SqlTransaction.cs
- SpellerHighlightLayer.cs
- TypeConverters.cs
- ListMarkerSourceInfo.cs
- WebPartsSection.cs
- Rectangle.cs
- QueryExpression.cs
- SudsCommon.cs
- RootBrowserWindowAutomationPeer.cs
- DragDeltaEventArgs.cs
- XmlElementCollection.cs
- ISO2022Encoding.cs
- ListItem.cs
- PaperSource.cs
- cookieexception.cs
- SafeSystemMetrics.cs
- DataTableReaderListener.cs
- WindowsTooltip.cs
- PropertyPathWorker.cs
- ShaderRenderModeValidation.cs
- ContainerActivationHelper.cs
- VideoDrawing.cs
- SrgsElementList.cs
- DataControlImageButton.cs
- DesignSurfaceManager.cs
- DataGridViewCell.cs
- DigitShape.cs
- TreeNodeClickEventArgs.cs
- TransportReplyChannelAcceptor.cs
- ScriptDescriptor.cs
- FixedHyperLink.cs
- WindowsAltTab.cs
- SerialPort.cs
- ThicknessAnimationBase.cs
- SizeAnimationUsingKeyFrames.cs
- DeferredReference.cs
- ProvidePropertyAttribute.cs
- ProxyWebPart.cs
- UIElementParaClient.cs
- StorageEndPropertyMapping.cs
- Cloud.cs
- NotifyParentPropertyAttribute.cs
- FixedBufferAttribute.cs
- RecordsAffectedEventArgs.cs
- MailHeaderInfo.cs
- FieldDescriptor.cs
- OdbcParameterCollection.cs
- TextSelectionProcessor.cs
- TextHidden.cs
- SelectedDatesCollection.cs
- InstancePersistenceCommandException.cs
- CriticalHandle.cs
- _ListenerAsyncResult.cs
- TTSEvent.cs
- QilNode.cs
- ReadContentAsBinaryHelper.cs
- ErrorTableItemStyle.cs
- CreateInstanceBinder.cs
- TdsParser.cs
- ToolStripPanelRenderEventArgs.cs
- DeclarativeConditionsCollection.cs
- DataGridViewImageCell.cs
- TransactionFilter.cs
- RequestSecurityTokenResponse.cs
- ObjectRef.cs
- FrameworkElementFactoryMarkupObject.cs
- ColorBlend.cs
- COM2EnumConverter.cs
- TdsParserHelperClasses.cs
- PermissionToken.cs
- SoapSchemaMember.cs
- _NegoState.cs
- XsltFunctions.cs
- ToolStripPanel.cs
- Types.cs