Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / wpf / src / Core / CSharp / 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 Worachai Chaoweeraprasit (wchao) // // 10-27-2004 garyyang Move to System.Windows.Media.TextFormatting // namespace // // 1-20-2005 garyyang 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. //------------------------------------------------------------------------ // // Microsoft Windows Client Platform // Copyright (C) Microsoft Corporation, 2004 // // File: GlyphShapingProperties.cs // // Contents: Definition of glyph properties // // Created: 1-2-2004 Worachai Chaoweeraprasit (wchao) // // 10-27-2004 garyyang Move to System.Windows.Media.TextFormatting // namespace // // 1-20-2005 garyyang 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
- LiteralControl.cs
- HandleValueEditor.cs
- ServiceContractGenerationContext.cs
- SecurityPermission.cs
- QueryStringHandler.cs
- _AutoWebProxyScriptEngine.cs
- SqlParameter.cs
- Help.cs
- VerificationException.cs
- ObjectQueryExecutionPlan.cs
- EditingCommands.cs
- Scheduler.cs
- GrammarBuilderWildcard.cs
- SvcFileManager.cs
- ProfileService.cs
- DataGridBoolColumn.cs
- CalendarDateRange.cs
- XPathExpr.cs
- BitmapEffectInput.cs
- SwitchLevelAttribute.cs
- EntityTransaction.cs
- ObjectReferenceStack.cs
- EpmContentSerializerBase.cs
- Stack.cs
- FieldDescriptor.cs
- SecurityRuntime.cs
- Html32TextWriter.cs
- _HeaderInfo.cs
- DataBoundControlAdapter.cs
- StaticFileHandler.cs
- HelpInfo.cs
- ErrorProvider.cs
- StyleHelper.cs
- __ComObject.cs
- Lookup.cs
- PrimaryKeyTypeConverter.cs
- DesignerRegionMouseEventArgs.cs
- SoapObjectWriter.cs
- StreamGeometryContext.cs
- Encoding.cs
- SqlBulkCopy.cs
- OdbcConnection.cs
- IdentityValidationException.cs
- XmlBufferReader.cs
- ConfigXmlDocument.cs
- CatalogZone.cs
- MasterPageBuildProvider.cs
- ClientUtils.cs
- InputGestureCollection.cs
- XmlAttributeAttribute.cs
- FilteredReadOnlyMetadataCollection.cs
- PrimitiveXmlSerializers.cs
- PerformanceCountersElement.cs
- FixedSOMContainer.cs
- lengthconverter.cs
- XPathPatternParser.cs
- TextWriterEngine.cs
- CompoundFileReference.cs
- SoapTransportImporter.cs
- HttpModuleAction.cs
- MergePropertyDescriptor.cs
- PnrpPermission.cs
- Expander.cs
- AxHost.cs
- storepermission.cs
- CriticalHandle.cs
- FileDialog_Vista_Interop.cs
- TraceEventCache.cs
- PageCodeDomTreeGenerator.cs
- Array.cs
- CurrentChangingEventManager.cs
- ISessionStateStore.cs
- HwndSubclass.cs
- HtmlCommandAdapter.cs
- RSAPKCS1SignatureDeformatter.cs
- GetLedgerRequest.cs
- X509CertificateClaimSet.cs
- FieldBuilder.cs
- XmlSchemaObjectCollection.cs
- SqlDuplicator.cs
- DataErrorValidationRule.cs
- WS2007HttpBinding.cs
- NeutralResourcesLanguageAttribute.cs
- util.cs
- AssemblyFilter.cs
- Geometry3D.cs
- ProfileElement.cs
- SplineKeyFrames.cs
- ColorTransformHelper.cs
- PointAnimationUsingPath.cs
- HiddenFieldPageStatePersister.cs
- WCFBuildProvider.cs
- ItemType.cs
- IdentifierElement.cs
- EntityCommandCompilationException.cs
- TCPListener.cs
- DesignerActionUIService.cs
- AttributeCollection.cs
- NativeMethodsCLR.cs
- ModelService.cs