Code:
/ DotNET / DotNET / 8.0 / untmp / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / Core / MS / Internal / Shaping / GlyphShapingProperties.cs / 1 / GlyphShapingProperties.cs
//------------------------------------------------------------------------ // // Microsoft Windows Client Platform // Copyright (C) Microsoft Corporation, 2004 // // File: GlyphShapingProperties.cs // // Contents: Definition of glyph properties // // Created: 1-2-2004 [....] ([....]) // // 10-27-2004 [....] Move to System.Windows.Media.TextFormatting // namespace // // 1-20-2005 [....] Move to MS.Internal.Shaping //----------------------------------------------------------------------- using System; namespace MS.Internal.Shaping { ////// Properties indicating glyph characteristics /// internal struct GlyphShapingProperties { ////// Construct a glyph properties value from multiple values from shaping /// /// shaping engine glyph flags /// bits reserved for shaping engine use internal GlyphShapingProperties( ushort glyphFlags, ushort engineReserved ) { _value = glyphFlags; _value |= ((uint)engineReserved) << 16; } ////// Get or Set bits reserved for shaping engine use /// internal ushort GlyphFlags { get { return (ushort)(_value & GlyphFlagsMask); } set { _value = (_value & ~EngineReservedValueMask) | (uint)value; } } ////// Get or Set bits reserved for shaping engine use /// internal ushort EngineReserved { get { return (ushort)(_value >> 16); } set { _value = (_value & ~EngineReservedValueMask) | (uint)(value << 16); } } ////// Explicitly convert this value type to integer /// public static explicit operator int(GlyphShapingProperties props) { return (int)props._value; } ////// Compares two GlyphShapingProperties for equality. /// ///Returns true if the arguments have identical properties, false if not. public static bool operator ==( GlyphShapingProperties left, GlyphShapingProperties right) { return left._value == right._value; } ////// Compares two GlyphShapingProperties for inequality. /// ///Returns true if the arguments are not equal, false if they are equal. public static bool operator !=( GlyphShapingProperties left, GlyphShapingProperties right) { return !(left == right); } ////// Compares the specified object with this. /// ///Returns true if the specified object is a GlyphShapingProperties with the same /// value as this object. public override bool Equals( object o) { if (o != null && o is GlyphShapingProperties) { return (GlyphShapingProperties)o == this; } else { return false; } } ////// Returns a hash code based on the property flags. /// public override int GetHashCode() { return (int)_value; } private uint _value; private const uint GlyphFlagsMask = 0x0000FFFF; private const uint EngineReservedValueMask = 0xFFFF0000; } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- DataGridColumnHeadersPresenter.cs
- MetaModel.cs
- WorkflowInstanceRecord.cs
- TabControl.cs
- DataGridViewUtilities.cs
- TypeSystem.cs
- XslUrlEditor.cs
- SemanticResolver.cs
- ListViewTableCell.cs
- SafeWaitHandle.cs
- XpsException.cs
- DbDataSourceEnumerator.cs
- ParameterCollection.cs
- QilScopedVisitor.cs
- xmlsaver.cs
- Stopwatch.cs
- ToolStripSettings.cs
- TransformerTypeCollection.cs
- ParallelDesigner.cs
- UInt16.cs
- ColumnPropertiesGroup.cs
- TreeNode.cs
- SafeNativeMemoryHandle.cs
- SpeechEvent.cs
- DebugView.cs
- XamlSerializerUtil.cs
- ConfigsHelper.cs
- XmlDataSource.cs
- NameValuePermission.cs
- DesignerProperties.cs
- ProxyManager.cs
- SQLByte.cs
- TargetControlTypeAttribute.cs
- RegistryKey.cs
- UpDownBaseDesigner.cs
- BatchWriter.cs
- CompilerGeneratedAttribute.cs
- SqlProviderUtilities.cs
- ContentFileHelper.cs
- UidPropertyAttribute.cs
- GridViewUpdateEventArgs.cs
- UriExt.cs
- ImportCatalogPart.cs
- HistoryEventArgs.cs
- WpfXamlType.cs
- MeasureItemEvent.cs
- CmsUtils.cs
- MediaContext.cs
- User.cs
- SspiSafeHandles.cs
- WebMessageEncoderFactory.cs
- ModuleBuilderData.cs
- XmlValidatingReader.cs
- XmlILIndex.cs
- Int16KeyFrameCollection.cs
- RegisteredHiddenField.cs
- OpCodes.cs
- odbcmetadatacollectionnames.cs
- SafeNativeMethodsOther.cs
- InputScope.cs
- DbException.cs
- IFlowDocumentViewer.cs
- ObsoleteAttribute.cs
- RoutedUICommand.cs
- AsyncOperation.cs
- VisualTreeHelper.cs
- CultureTable.cs
- GridSplitter.cs
- GridViewHeaderRowPresenterAutomationPeer.cs
- DataSourceControlBuilder.cs
- basecomparevalidator.cs
- ClientFormsAuthenticationMembershipProvider.cs
- ServiceOperation.cs
- RuntimeIdentifierPropertyAttribute.cs
- NullRuntimeConfig.cs
- DynamicILGenerator.cs
- InteropAutomationProvider.cs
- UmAlQuraCalendar.cs
- DataGridViewCellCollection.cs
- DataGridSortCommandEventArgs.cs
- ActivityXRefConverter.cs
- Pipe.cs
- DbConnectionClosed.cs
- XmlBaseWriter.cs
- Section.cs
- BoundField.cs
- ValidationSummary.cs
- ContourSegment.cs
- ColorAnimationBase.cs
- TypeResolvingOptionsAttribute.cs
- InvalidEnumArgumentException.cs
- XPathBuilder.cs
- DrawingState.cs
- ArrayWithOffset.cs
- TreeNodeBindingCollection.cs
- SectionXmlInfo.cs
- ComponentResourceKeyConverter.cs
- ApplicationInterop.cs
- PropertyEntry.cs
- StrokeNodeOperations2.cs