Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Core / CSharp / System / Windows / Media / textformatting / TextEmbeddedObject.cs / 1305600 / TextEmbeddedObject.cs
//------------------------------------------------------------------------ // // Microsoft Windows Client Platform // Copyright (C) Microsoft Corporation, 2004 // // File: TextEmbeddedObject.cs // // Contents: Definition of text embedded object // // Spec: http://avalon/text/DesignDocsAndSpecs/Text%20Formatting%20API.doc // // Created: 1-2-2004 Worachai Chaoweeraprasit (wchao) // //----------------------------------------------------------------------- using System; using System.Collections; using System.Windows; using System.Windows.Media; using MS.Internal.TextFormatting; namespace System.Windows.Media.TextFormatting { ////// Provide definition for a kind of text content in which measuring, hittesting /// and drawing of the entire content is done in whole. Example of that kind of /// content is a button in the middle of the line. /// public abstract class TextEmbeddedObject : TextRun { ////// Line break condition before text object /// public abstract LineBreakCondition BreakBefore { get; } ////// Line break condition after text object /// public abstract LineBreakCondition BreakAfter { get; } ////// Flag indicates whether text object has fixed size regardless of where /// it is placed within a line /// public abstract bool HasFixedSize { get; } ////// Get text object measurement metrics that will fit within the specified /// remaining width of the paragraph /// /// remaining paragraph width ///text object metrics public abstract TextEmbeddedObjectMetrics Format( double remainingParagraphWidth ); ////// Get computed bounding box of text object /// /// run is drawn from right to left /// run is drawn with its side parallel to baseline ///computed bounding box size of text object public abstract Rect ComputeBoundingBox( bool rightToLeft, bool sideways ); ////// Draw text object /// /// drawing context /// origin where the object is drawn /// run is drawn from right to left /// run is drawn with its side parallel to baseline public abstract void Draw( DrawingContext drawingContext, Point origin, bool rightToLeft, bool sideways ); } ////// Text object properties /// public class TextEmbeddedObjectMetrics { private double _width; private double _height; private double _baseline; ////// Construct a text object size /// /// object width /// object height /// object baseline in ratio relative to run height public TextEmbeddedObjectMetrics( double width, double height, double baseline ) { _width = width; _height = height; _baseline = baseline; } ////// Object width /// public double Width { get { return _width; } } ////// Object height /// ///public double Height { get { return _height; } } /// /// Object baseline in ratio relative to run height /// public double Baseline { get { return _baseline; } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
![Network programming in C#, Network Programming in VB.NET, Network Programming in .NET](/images/book.jpg)
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- LambdaCompiler.cs
- FtpRequestCacheValidator.cs
- MeasurementDCInfo.cs
- ObjectContext.cs
- DateTimeConverter2.cs
- PartialCachingAttribute.cs
- ADMembershipUser.cs
- SecurityTraceRecordHelper.cs
- DataListComponentEditor.cs
- PreProcessor.cs
- WorkflowMarkupSerializationException.cs
- BindingCollection.cs
- ImageListStreamer.cs
- ByteConverter.cs
- FixUp.cs
- XsdBuilder.cs
- WindowsSecurityToken.cs
- Expressions.cs
- CodeCastExpression.cs
- PrintingPermissionAttribute.cs
- ReachDocumentSequenceSerializer.cs
- SafeMILHandle.cs
- ComponentEditorForm.cs
- XmlArrayAttribute.cs
- DiscoveryMessageSequenceCD1.cs
- SystemResourceHost.cs
- Module.cs
- SafeRightsManagementEnvironmentHandle.cs
- DateTimeFormatInfo.cs
- ASCIIEncoding.cs
- PresentationTraceSources.cs
- ProtocolElement.cs
- XmlBinaryReader.cs
- ResourceExpressionEditorSheet.cs
- DropShadowBitmapEffect.cs
- X509ChainPolicy.cs
- CommandLineParser.cs
- HebrewCalendar.cs
- ProfileParameter.cs
- ToolStripTextBox.cs
- SecurityPolicySection.cs
- PlaceHolder.cs
- Pen.cs
- MenuDesigner.cs
- DrawingDrawingContext.cs
- TypeLoader.cs
- Triplet.cs
- Color.cs
- clipboard.cs
- SspiNegotiationTokenProvider.cs
- HttpsTransportBindingElement.cs
- InputLangChangeRequestEvent.cs
- ObjectList.cs
- DbProviderFactory.cs
- SplineKeyFrames.cs
- ToolStripProgressBar.cs
- ApplicationFileParser.cs
- StaticDataManager.cs
- XmlNodeComparer.cs
- EncoderParameters.cs
- XmlCustomFormatter.cs
- MenuItemBinding.cs
- PropertyKey.cs
- GuidTagList.cs
- GenericTextProperties.cs
- EncodingDataItem.cs
- ComponentDesigner.cs
- PermissionSet.cs
- WebHeaderCollection.cs
- XPathDescendantIterator.cs
- RemoveStoryboard.cs
- FunctionQuery.cs
- CodeTypeReferenceCollection.cs
- AllMembershipCondition.cs
- HttpContext.cs
- EntitySqlQueryCacheEntry.cs
- KeyedQueue.cs
- ServerReliableChannelBinder.cs
- TypedDataSetSchemaImporterExtensionFx35.cs
- FixedSOMTextRun.cs
- WebEventTraceProvider.cs
- CodeIdentifier.cs
- RoleManagerSection.cs
- OuterGlowBitmapEffect.cs
- StringUtil.cs
- ViewUtilities.cs
- SetUserPreferenceRequest.cs
- DrawingGroup.cs
- SQLResource.cs
- BookmarkEventArgs.cs
- ToolStripScrollButton.cs
- XMLUtil.cs
- WS2007FederationHttpBindingCollectionElement.cs
- EntityDataSource.cs
- VoiceChangeEventArgs.cs
- CqlErrorHelper.cs
- NativeCompoundFileAPIs.cs
- ObjectDataSourceMethodEventArgs.cs
- Font.cs
- HtmlElement.cs