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
- SharedDp.cs
- Missing.cs
- ServiceProviders.cs
- DelegatingTypeDescriptionProvider.cs
- XmlComplianceUtil.cs
- Label.cs
- WebPartConnectionsCancelEventArgs.cs
- WebPartActionVerb.cs
- EpmContentDeSerializerBase.cs
- UnsafeNativeMethods.cs
- UnsafeNativeMethods.cs
- XmlDocumentType.cs
- dataSvcMapFileLoader.cs
- DataGrid.cs
- MenuEventArgs.cs
- ShaderEffect.cs
- HashHelper.cs
- EnterpriseServicesHelper.cs
- CodeGenHelper.cs
- ApplicationId.cs
- AudioException.cs
- InstanceView.cs
- XmlnsCompatibleWithAttribute.cs
- BitmapImage.cs
- InvalidAsynchronousStateException.cs
- SqlClientMetaDataCollectionNames.cs
- InternalsVisibleToAttribute.cs
- ContentPlaceHolder.cs
- StylusCollection.cs
- DetailsViewModeEventArgs.cs
- EntityDesignerDataSourceView.cs
- ObjectStorage.cs
- AsyncSerializedWorker.cs
- JoinElimination.cs
- SerialReceived.cs
- ExpressionBinding.cs
- FeedUtils.cs
- TextElement.cs
- CodeCompileUnit.cs
- ContentFilePart.cs
- BitmapEffectCollection.cs
- XPathScanner.cs
- XmlLoader.cs
- HTTPNotFoundHandler.cs
- BaseCodePageEncoding.cs
- Token.cs
- WebPartManager.cs
- PieceNameHelper.cs
- ParameterDataSourceExpression.cs
- PeoplePickerWrapper.cs
- SplitterEvent.cs
- CachedBitmap.cs
- odbcmetadatafactory.cs
- Visual.cs
- ContractAdapter.cs
- SqlRetyper.cs
- ResourceManagerWrapper.cs
- TextSimpleMarkerProperties.cs
- SqlDeflator.cs
- FixedHighlight.cs
- WebPartVerb.cs
- ComponentEditorPage.cs
- DataGridBoolColumn.cs
- HttpRequest.cs
- SqlDelegatedTransaction.cs
- Menu.cs
- InvalidCommandTreeException.cs
- JumpList.cs
- DataTablePropertyDescriptor.cs
- RuleProcessor.cs
- Brush.cs
- ColumnTypeConverter.cs
- SqlUserDefinedTypeAttribute.cs
- EditorZoneAutoFormat.cs
- EncryptedType.cs
- CompilerGlobalScopeAttribute.cs
- MergePropertyDescriptor.cs
- ObjectSecurity.cs
- FieldTemplateFactory.cs
- WorkflowInstance.cs
- TracedNativeMethods.cs
- ServiceDescriptionImporter.cs
- ApplicationHost.cs
- PropertyMapper.cs
- ConstraintEnumerator.cs
- SqlLiftIndependentRowExpressions.cs
- ProviderConnectionPointCollection.cs
- SmtpNtlmAuthenticationModule.cs
- ExpressionBuilderContext.cs
- LabelExpression.cs
- PropertyItemInternal.cs
- SqlMethodCallConverter.cs
- HtmlEncodedRawTextWriter.cs
- RightsManagementPermission.cs
- XDeferredAxisSource.cs
- DynamicILGenerator.cs
- Subtree.cs
- HtmlTable.cs
- ControlCollection.cs
- ColumnWidthChangingEvent.cs