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
- WebPartAddingEventArgs.cs
- SoapObjectInfo.cs
- SQLResource.cs
- FormatSettings.cs
- DataGridView.cs
- AuditLog.cs
- TextTreeRootTextBlock.cs
- CodeDOMProvider.cs
- ListDependantCardsRequest.cs
- DataAccessor.cs
- FastPropertyAccessor.cs
- TableLayoutStyle.cs
- MailBnfHelper.cs
- SqlTrackingQuery.cs
- ErrorTableItemStyle.cs
- MemoryRecordBuffer.cs
- OleStrCAMarshaler.cs
- FlowDocumentView.cs
- AppSettingsExpressionBuilder.cs
- WhitespaceRuleReader.cs
- LinkClickEvent.cs
- BackgroundWorker.cs
- StoragePropertyMapping.cs
- SchemaLookupTable.cs
- RuntimeCompatibilityAttribute.cs
- StringAttributeCollection.cs
- CodeGen.cs
- FontStretchConverter.cs
- WebBrowserNavigatedEventHandler.cs
- CodeObjectCreateExpression.cs
- BinaryHeap.cs
- QueueProcessor.cs
- RSAPKCS1KeyExchangeFormatter.cs
- QilParameter.cs
- _PooledStream.cs
- HtmlInputReset.cs
- Bitmap.cs
- DataSourceControl.cs
- RuntimeHandles.cs
- SafeHandles.cs
- GridItemPatternIdentifiers.cs
- TextServicesLoader.cs
- KeyEvent.cs
- Vector3DValueSerializer.cs
- AssemblyGen.cs
- MaskedTextProvider.cs
- Intellisense.cs
- ManagementScope.cs
- NumericUpDownAccelerationCollection.cs
- XPathSingletonIterator.cs
- BCryptSafeHandles.cs
- ComponentEditorForm.cs
- GenericEnumerator.cs
- ObjectMemberMapping.cs
- DetailsViewInsertedEventArgs.cs
- IDictionary.cs
- BaseCodePageEncoding.cs
- AssertFilter.cs
- SqlProvider.cs
- TextElementEnumerator.cs
- COM2PropertyDescriptor.cs
- SqlRecordBuffer.cs
- DataGridViewRowCollection.cs
- XmlReflectionImporter.cs
- WebServiceHostFactory.cs
- TreeViewHitTestInfo.cs
- GeneralTransform3DGroup.cs
- LinqDataSourceUpdateEventArgs.cs
- updateconfighost.cs
- ProgressPage.cs
- PolicyUnit.cs
- COSERVERINFO.cs
- RewritingSimplifier.cs
- WorkflowApplication.cs
- FrameworkElement.cs
- JsonXmlDataContract.cs
- ToolStripPanelRow.cs
- DetailsViewCommandEventArgs.cs
- MsmqChannelFactory.cs
- TextCollapsingProperties.cs
- StylusButtonCollection.cs
- RecipientInfo.cs
- PropertyIdentifier.cs
- UnsafeNativeMethods.cs
- ExternalFile.cs
- DataErrorValidationRule.cs
- RsaSecurityTokenAuthenticator.cs
- ColumnReorderedEventArgs.cs
- AttachedPropertyBrowsableForTypeAttribute.cs
- RemoteWebConfigurationHostStream.cs
- CodeTypeMember.cs
- TimeSpanValidator.cs
- ApplicationFileParser.cs
- UntrustedRecipientException.cs
- AdCreatedEventArgs.cs
- FrameworkElementFactory.cs
- ControlValuePropertyAttribute.cs
- WpfGeneratedKnownProperties.cs
- EdmError.cs
- MediaContextNotificationWindow.cs