Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Core / CSharp / System / Windows / Media / ImageDrawing.cs / 1305600 / ImageDrawing.cs
//---------------------------------------------------------------------------- // // Copyright (c) Microsoft Corporation. All rights reserved. // // Description: ImageDrawing represents a drawing operation that renders // an image into a destination rectangle. // // History: // // 2004/11/17 : timothyc - Created it. // //--------------------------------------------------------------------------- using System.Diagnostics; using System.Windows.Media.Imaging; using MS.Internal; namespace System.Windows.Media { ////// ImageDrawing represents a drawing operation that renders an image into /// a destination rectangle /// public sealed partial class ImageDrawing : Drawing { #region Constructors ////// Default ImageDrawing constructor. /// Constructs an object with all properties set to their default values /// public ImageDrawing() { } ////// Two-argument ImageDrawing constructor. /// Constructs an object with the ImageSource and Rect properties /// set to the value of their respective arguments. /// public ImageDrawing(ImageSource imageSource, Rect rect) { ImageSource = imageSource; Rect = rect; } #endregion #region Internal methods ////// Calls methods on the DrawingContext that are equivalent to the /// Drawing with the Drawing's current value. /// internal override void WalkCurrentValue(DrawingContextWalker ctx) { // We avoid unneccessary ShouldStopWalking checks based on assumptions // about when ShouldStopWalking is set. Guard that assumption with an // assertion. See DrawingGroup.WalkCurrentValue comment for more details. ctx.DrawImage( ImageSource, Rect ); } #endregion Internal methods } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //---------------------------------------------------------------------------- // // Copyright (c) Microsoft Corporation. All rights reserved. // // Description: ImageDrawing represents a drawing operation that renders // an image into a destination rectangle. // // History: // // 2004/11/17 : timothyc - Created it. // //--------------------------------------------------------------------------- using System.Diagnostics; using System.Windows.Media.Imaging; using MS.Internal; namespace System.Windows.Media { ////// ImageDrawing represents a drawing operation that renders an image into /// a destination rectangle /// public sealed partial class ImageDrawing : Drawing { #region Constructors ////// Default ImageDrawing constructor. /// Constructs an object with all properties set to their default values /// public ImageDrawing() { } ////// Two-argument ImageDrawing constructor. /// Constructs an object with the ImageSource and Rect properties /// set to the value of their respective arguments. /// public ImageDrawing(ImageSource imageSource, Rect rect) { ImageSource = imageSource; Rect = rect; } #endregion #region Internal methods ////// Calls methods on the DrawingContext that are equivalent to the /// Drawing with the Drawing's current value. /// internal override void WalkCurrentValue(DrawingContextWalker ctx) { // We avoid unneccessary ShouldStopWalking checks based on assumptions // about when ShouldStopWalking is set. Guard that assumption with an // assertion. See DrawingGroup.WalkCurrentValue comment for more details. ctx.DrawImage( ImageSource, Rect ); } #endregion Internal methods } } // 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
- ChtmlCalendarAdapter.cs
- SqlXmlStorage.cs
- WSDualHttpSecurityMode.cs
- PauseStoryboard.cs
- TypeForwardedToAttribute.cs
- ShadowGlyph.cs
- AccessKeyManager.cs
- XmlSchemaValidationException.cs
- EnumValAlphaComparer.cs
- configsystem.cs
- CachedPathData.cs
- SqlNodeAnnotations.cs
- ListViewInsertionMark.cs
- TraceLog.cs
- Vector3DConverter.cs
- DynamicValidatorEventArgs.cs
- HttpServerVarsCollection.cs
- FixedSOMTableRow.cs
- IPGlobalProperties.cs
- SignatureResourceHelper.cs
- SrgsSubset.cs
- Quaternion.cs
- AsyncCompletedEventArgs.cs
- ClientUtils.cs
- ChangeProcessor.cs
- XmlCharacterData.cs
- HandlerFactoryCache.cs
- SystemFonts.cs
- FileCodeGroup.cs
- RtType.cs
- Profiler.cs
- BinaryUtilClasses.cs
- X509InitiatorCertificateClientElement.cs
- RawUIStateInputReport.cs
- NamespaceExpr.cs
- Point3DCollectionConverter.cs
- ArraySegment.cs
- DescendantOverDescendantQuery.cs
- WinInet.cs
- TypedAsyncResult.cs
- TypeDescriptor.cs
- PropertyPushdownHelper.cs
- HeaderCollection.cs
- DataGridViewLayoutData.cs
- RenderingEventArgs.cs
- XmlObjectSerializerReadContextComplex.cs
- StreamGeometryContext.cs
- XmlAttributeOverrides.cs
- SmiContextFactory.cs
- SqlPersistenceProviderFactory.cs
- ChangeTracker.cs
- WebEventCodes.cs
- ProfileInfo.cs
- WebBrowser.cs
- FrameAutomationPeer.cs
- XAMLParseException.cs
- TemplateNameScope.cs
- CSharpCodeProvider.cs
- SqlCachedBuffer.cs
- TypeGeneratedEventArgs.cs
- RectAnimationUsingKeyFrames.cs
- EntityDesignerBuildProvider.cs
- DataAccessException.cs
- RowToFieldTransformer.cs
- AccessDataSourceView.cs
- ModelItemImpl.cs
- FontNamesConverter.cs
- SignedPkcs7.cs
- HashCryptoHandle.cs
- SocketManager.cs
- XmlnsPrefixAttribute.cs
- XmlAutoDetectWriter.cs
- TemplateParser.cs
- ListViewTableRow.cs
- DataGridViewColumnStateChangedEventArgs.cs
- PackageStore.cs
- SpecialNameAttribute.cs
- SiteOfOriginPart.cs
- TreeView.cs
- ViewValidator.cs
- ICspAsymmetricAlgorithm.cs
- ConnectionOrientedTransportBindingElement.cs
- MimeObjectFactory.cs
- ZipIOZip64EndOfCentralDirectoryBlock.cs
- AttributeCollection.cs
- IPGlobalProperties.cs
- DefaultPrintController.cs
- Rotation3DAnimation.cs
- OutputScopeManager.cs
- LicFileLicenseProvider.cs
- MediaCommands.cs
- EndEvent.cs
- CommandHelpers.cs
- BufferedStream.cs
- NumericExpr.cs
- ipaddressinformationcollection.cs
- RewritingSimplifier.cs
- GridViewRowPresenterBase.cs
- KeyNotFoundException.cs
- ScriptResourceDefinition.cs