Code:
/ DotNET / DotNET / 8.0 / untmp / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / Core / System / Windows / Media / MatrixTransform.cs / 1 / 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
- DataGridViewColumnCollectionDialog.cs
- StateMachineExecutionState.cs
- ObjectSet.cs
- GradientStop.cs
- XmlElementList.cs
- UnitySerializationHolder.cs
- WindowAutomationPeer.cs
- FixedTextBuilder.cs
- OdbcConnectionHandle.cs
- ListViewDeletedEventArgs.cs
- Trace.cs
- BrowserCapabilitiesFactoryBase.cs
- InstanceLockQueryResult.cs
- XmlExpressionDumper.cs
- TdsRecordBufferSetter.cs
- Ref.cs
- CompatibleIComparer.cs
- SignatureDescription.cs
- Main.cs
- MLangCodePageEncoding.cs
- MsmqAppDomainProtocolHandler.cs
- ServiceObjectContainer.cs
- StoreItemCollection.Loader.cs
- PackageStore.cs
- DoubleSumAggregationOperator.cs
- TypeLibConverter.cs
- DataGridViewCell.cs
- Identity.cs
- RSAOAEPKeyExchangeDeformatter.cs
- Header.cs
- ProxyWebPartManager.cs
- SqlDependencyUtils.cs
- SignerInfo.cs
- dbdatarecord.cs
- InkCanvasInnerCanvas.cs
- SchemaElementLookUpTableEnumerator.cs
- StreamReader.cs
- Material.cs
- CultureInfoConverter.cs
- DataBoundLiteralControl.cs
- PaginationProgressEventArgs.cs
- PolicyValidationException.cs
- CommandSet.cs
- AttributeUsageAttribute.cs
- ClientSponsor.cs
- EventPrivateKey.cs
- ScanQueryOperator.cs
- CapabilitiesUse.cs
- BamlResourceSerializer.cs
- DataSpaceManager.cs
- _ListenerRequestStream.cs
- JpegBitmapDecoder.cs
- COM2EnumConverter.cs
- Rotation3D.cs
- Size.cs
- HttpCachePolicyElement.cs
- ModelVisual3D.cs
- SystemFonts.cs
- EdmType.cs
- ProgressBar.cs
- MultiBindingExpression.cs
- X509Chain.cs
- Action.cs
- DeobfuscatingStream.cs
- ToolTipAutomationPeer.cs
- shaperfactory.cs
- Misc.cs
- InputBinder.cs
- EndPoint.cs
- DataListItemCollection.cs
- EdmToObjectNamespaceMap.cs
- OleDbCommandBuilder.cs
- HitTestFilterBehavior.cs
- DictionaryEntry.cs
- HtmlHead.cs
- TraceUtility.cs
- QueryRelOp.cs
- DefaultValueAttribute.cs
- OpCellTreeNode.cs
- SoapSchemaImporter.cs
- XmlSchemaExternal.cs
- ObjectManager.cs
- RequestCachePolicyConverter.cs
- SmtpLoginAuthenticationModule.cs
- CookielessHelper.cs
- Metafile.cs
- BigInt.cs
- DefaultValueTypeConverter.cs
- RC2.cs
- FileUtil.cs
- ParserContext.cs
- NotifyCollectionChangedEventArgs.cs
- DataTableCollection.cs
- NameGenerator.cs
- GestureRecognizer.cs
- XPathDescendantIterator.cs
- WaitHandleCannotBeOpenedException.cs
- OneToOneMappingSerializer.cs
- ISAPIApplicationHost.cs
- CollaborationHelperFunctions.cs