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
- SimpleParser.cs
- SymLanguageType.cs
- InvalidOleVariantTypeException.cs
- SmtpCommands.cs
- QueryOutputWriter.cs
- TextFormattingConverter.cs
- NetworkInformationPermission.cs
- IMembershipProvider.cs
- ManipulationLogic.cs
- DrawingVisual.cs
- ValidatingReaderNodeData.cs
- EventProviderWriter.cs
- SafeReversePInvokeHandle.cs
- GenericWebPart.cs
- ConnectionStringsExpressionBuilder.cs
- DefinitionBase.cs
- ToolboxControl.cs
- BindableTemplateBuilder.cs
- Int32CAMarshaler.cs
- RegisteredExpandoAttribute.cs
- XmlUTF8TextWriter.cs
- DbBuffer.cs
- NativeMethods.cs
- BatchParser.cs
- AutomationProperties.cs
- XPathSingletonIterator.cs
- _ListenerAsyncResult.cs
- BindingManagerDataErrorEventArgs.cs
- SubMenuStyle.cs
- TableRowGroupCollection.cs
- PropertyInformation.cs
- Clause.cs
- Random.cs
- PrincipalPermission.cs
- MsmqInputChannelListenerBase.cs
- SerializationTrace.cs
- ConstraintStruct.cs
- Timeline.cs
- UrlMappingsModule.cs
- UserNamePasswordClientCredential.cs
- CopyOfAction.cs
- HttpCachePolicyElement.cs
- CorrelationKeyCalculator.cs
- WinEventHandler.cs
- RSAOAEPKeyExchangeFormatter.cs
- UriTemplateDispatchFormatter.cs
- WmlValidationSummaryAdapter.cs
- UrlMappingsModule.cs
- TextBreakpoint.cs
- WindowsButton.cs
- AlignmentXValidation.cs
- SqlExpressionNullability.cs
- Selector.cs
- ProtocolsConfiguration.cs
- MimeMultiPart.cs
- ControlPropertyNameConverter.cs
- MinimizableAttributeTypeConverter.cs
- DynamicPropertyHolder.cs
- WebPartExportVerb.cs
- ToggleButton.cs
- DirectoryObjectSecurity.cs
- LoginCancelEventArgs.cs
- ButtonField.cs
- BinHexEncoder.cs
- CultureInfoConverter.cs
- RadialGradientBrush.cs
- Helper.cs
- COM2PropertyPageUITypeConverter.cs
- SortAction.cs
- StringUtil.cs
- EntityDataSource.cs
- XmlSigningNodeWriter.cs
- TaskSchedulerException.cs
- ValueTypeFixupInfo.cs
- Odbc32.cs
- TableLayoutStyle.cs
- DataGridPagerStyle.cs
- XmlException.cs
- DebuggerAttributes.cs
- _ConnectStream.cs
- ExtendLockCommand.cs
- CommonDialog.cs
- BadImageFormatException.cs
- UTF8Encoding.cs
- UriWriter.cs
- DataBindEngine.cs
- CngProperty.cs
- InvokeWebService.cs
- XmlSchemaValidator.cs
- DataConnectionHelper.cs
- DataPager.cs
- StickyNote.cs
- ValueConversionAttribute.cs
- CancellableEnumerable.cs
- DesignerActionGlyph.cs
- AssemblyResourceLoader.cs
- CheckBoxPopupAdapter.cs
- ConcurrentDictionary.cs
- User.cs
- GenerateTemporaryAssemblyTask.cs