Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Core / CSharp / System / Windows / Media / MatrixTransform.cs / 1305600 / MatrixTransform.cs
//------------------------------------------------------------------------------ // Microsoft Avalon // Copyright (c) Microsoft Corporation, 2001 // // File: MatrixTransform.cs //----------------------------------------------------------------------------- using System.Windows.Media; using System; using System.Windows; using System.ComponentModel; using System.ComponentModel.Design.Serialization; using System.Reflection; using System.Security; using System.Security.Permissions; using System.Collections; using MS.Internal; using MS.Internal.PresentationCore; using System.Windows.Media.Animation; using System.Globalization; using System.Text; using System.Runtime.InteropServices; using System.Windows.Media.Composition; using System.Diagnostics; using SR=MS.Internal.PresentationCore.SR; using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media { ////// Create an arbitrary matrix transformation. /// public sealed partial class MatrixTransform : Transform { #region Constructors ////// /// public MatrixTransform() { } ////// Create an arbitrary matrix transformation. /// ///Matrix value at position 1,1 ///Matrix value at position 1,2 ///Matrix value at position 2,1 ///Matrix value at position 2,2 ///Matrix value at position 3,1 ///Matrix value at position 3,2 public MatrixTransform( double m11, double m12, double m21, double m22, double offsetX, double offsetY ) { Matrix = new Matrix(m11, m12, m21, m22, offsetX, offsetY); } ////// Create a matrix transformation from constant transform. /// ///The constant matrix transformation. public MatrixTransform(Matrix matrix) { Matrix = matrix; } #endregion ////// Return the current transformation value. /// public override Matrix Value { get { ReadPreamble(); return Matrix; } } #region Internal Methods ////// Returns true if transformation matches the identity transform. /// internal override bool IsIdentity { get { return Matrix.IsIdentity && CanFreeze; } } internal override bool CanSerializeToString() { return CanFreeze; } ////// Creates a string representation of this object based on the format string /// and IFormatProvider passed in. /// If the provider is null, the CurrentCulture is used. /// See the documentation for IFormattable for more information. /// ////// A string representation of this object. /// internal override string ConvertToString(string format, IFormatProvider provider) { if (!CanSerializeToString()) { return base.ConvertToString(format, provider); } return ((IFormattable)Matrix).ToString(format, provider); } internal override void TransformRect(ref Rect rect) { Matrix matrix = Matrix; MatrixUtil.TransformRect(ref rect, ref matrix); } internal override void MultiplyValueByMatrix(ref Matrix result, ref Matrix matrixToMultiplyBy) { result = Matrix; MatrixUtil.MultiplyMatrix(ref result, ref matrixToMultiplyBy); } #endregion Internal Methods } } // 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
- CalendarDesigner.cs
- WizardStepBase.cs
- HttpModulesSection.cs
- DataGridColumn.cs
- RuleInfoComparer.cs
- Int32Animation.cs
- SingleResultAttribute.cs
- UnmanagedMemoryStreamWrapper.cs
- ClientScriptManagerWrapper.cs
- LabelDesigner.cs
- EntityDataSourceChangedEventArgs.cs
- DispatcherExceptionEventArgs.cs
- UndoEngine.cs
- ContextMenuStrip.cs
- SynchronizationContext.cs
- ListView.cs
- JapaneseLunisolarCalendar.cs
- ISessionStateStore.cs
- ContentTextAutomationPeer.cs
- httpapplicationstate.cs
- AddressHeaderCollectionElement.cs
- ExpressionVisitorHelpers.cs
- ThreadExceptionDialog.cs
- NameService.cs
- InternalCache.cs
- XsdValidatingReader.cs
- CalendarDataBindingHandler.cs
- DataGridViewRowConverter.cs
- SafeWaitHandle.cs
- _StreamFramer.cs
- CodeCompileUnit.cs
- RegexCompiler.cs
- AssociatedControlConverter.cs
- WebEventCodes.cs
- ScriptRegistrationManager.cs
- SelfIssuedAuthRSAPKCS1SignatureFormatter.cs
- PropertyGridView.cs
- ExtendedProtectionPolicy.cs
- _ScatterGatherBuffers.cs
- WebPermission.cs
- ParseHttpDate.cs
- ObjectAnimationBase.cs
- ObjectAnimationUsingKeyFrames.cs
- AsyncPostBackTrigger.cs
- HtmlLink.cs
- ThousandthOfEmRealDoubles.cs
- PeerTransportBindingElement.cs
- AuthenticationException.cs
- BindingExpressionBase.cs
- _BasicClient.cs
- InlineObject.cs
- BackStopAuthenticationModule.cs
- BoundPropertyEntry.cs
- HtmlImage.cs
- UriScheme.cs
- XhtmlConformanceSection.cs
- WinEventWrap.cs
- DockPanel.cs
- SystemIPInterfaceProperties.cs
- GridViewRow.cs
- ColumnResizeUndoUnit.cs
- HeaderPanel.cs
- X509CertificateStore.cs
- UnsafeNativeMethodsPenimc.cs
- OleDbConnection.cs
- RadioButtonRenderer.cs
- NamedPipeDuplicateContext.cs
- Vector3DAnimation.cs
- GeneralTransform.cs
- Number.cs
- XmlStreamStore.cs
- EntityTypeEmitter.cs
- CodeMemberProperty.cs
- WebControl.cs
- HttpAsyncResult.cs
- PasswordBoxAutomationPeer.cs
- PageContentAsyncResult.cs
- ObjectQueryProvider.cs
- CompModSwitches.cs
- TdsParserStaticMethods.cs
- ClosableStream.cs
- ClientSideProviderDescription.cs
- Globals.cs
- SectionVisual.cs
- SecurityCriticalDataForSet.cs
- Highlights.cs
- TaskFileService.cs
- CommandBinding.cs
- IsolatedStoragePermission.cs
- IPipelineRuntime.cs
- PostBackOptions.cs
- SqlDeflator.cs
- HierarchicalDataSourceControl.cs
- OleDbException.cs
- AdPostCacheSubstitution.cs
- ObjectDataSourceEventArgs.cs
- StylusTip.cs
- WindowCollection.cs
- PageCache.cs
- AndCondition.cs