Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Core / CSharp / System / Windows / Media / SkewTransform.cs / 1305600 / SkewTransform.cs
//------------------------------------------------------------------------------ // Microsoft Avalon // Copyright (c) Microsoft Corporation, 2001 // // File: SkewTransform.cs //----------------------------------------------------------------------------- using MS.Internal; using MS.Internal.PresentationCore; using System; using System.Collections; using System.ComponentModel; using System.ComponentModel.Design.Serialization; using System.Diagnostics; using System.Globalization; using System.Reflection; using System.Runtime.InteropServices; using System.Text; using System.Windows; using System.Windows.Media; using System.Windows.Media.Animation; using System.Windows.Media.Composition; using SR=MS.Internal.PresentationCore.SR; using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media { ////// Create a skew X transformation. /// public sealed partial class SkewTransform : Transform { ////// /// public SkewTransform() { } ////// /// public SkewTransform(double angleX, double angleY) { AngleX = angleX; AngleY = angleY; } ////// /// public SkewTransform(double angleX, double angleY, double centerX, double centerY) : this(angleX, angleY) { CenterX = centerX; CenterY = centerY; } ////// Return the current transformation value. /// public override Matrix Value { get { ReadPreamble(); Matrix matrix = new Matrix(); double angleX = AngleX; double angleY = AngleY; double centerX = CenterX; double centerY = CenterY; bool hasCenter = centerX != 0 || centerY != 0; if (hasCenter) { matrix.Translate(-centerX, -centerY); } matrix.Skew(angleX, angleY); if (hasCenter) { matrix.Translate(centerX, centerY); } return matrix; } } ////// Returns true if transformation matches the identity transform. /// internal override bool IsIdentity { get { return AngleX == 0 && AngleY == 0 && CanFreeze; } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. //------------------------------------------------------------------------------ // Microsoft Avalon // Copyright (c) Microsoft Corporation, 2001 // // File: SkewTransform.cs //----------------------------------------------------------------------------- using MS.Internal; using MS.Internal.PresentationCore; using System; using System.Collections; using System.ComponentModel; using System.ComponentModel.Design.Serialization; using System.Diagnostics; using System.Globalization; using System.Reflection; using System.Runtime.InteropServices; using System.Text; using System.Windows; using System.Windows.Media; using System.Windows.Media.Animation; using System.Windows.Media.Composition; using SR=MS.Internal.PresentationCore.SR; using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media { ////// Create a skew X transformation. /// public sealed partial class SkewTransform : Transform { ////// /// public SkewTransform() { } ////// /// public SkewTransform(double angleX, double angleY) { AngleX = angleX; AngleY = angleY; } ////// /// public SkewTransform(double angleX, double angleY, double centerX, double centerY) : this(angleX, angleY) { CenterX = centerX; CenterY = centerY; } ////// Return the current transformation value. /// public override Matrix Value { get { ReadPreamble(); Matrix matrix = new Matrix(); double angleX = AngleX; double angleY = AngleY; double centerX = CenterX; double centerY = CenterY; bool hasCenter = centerX != 0 || centerY != 0; if (hasCenter) { matrix.Translate(-centerX, -centerY); } matrix.Skew(angleX, angleY); if (hasCenter) { matrix.Translate(centerX, centerY); } return matrix; } } ////// Returns true if transformation matches the identity transform. /// internal override bool IsIdentity { get { return AngleX == 0 && AngleY == 0 && CanFreeze; } } } } // 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
- DataStreams.cs
- QueueTransferProtocol.cs
- ActivityTrace.cs
- ContentOperations.cs
- ArrayItemValue.cs
- StringValidatorAttribute.cs
- DecoderBestFitFallback.cs
- XmlArrayItemAttributes.cs
- AnimationClock.cs
- DATA_BLOB.cs
- FieldToken.cs
- MatrixAnimationBase.cs
- NameValueConfigurationElement.cs
- ServiceContractAttribute.cs
- DebuggerAttributes.cs
- WebPartManagerInternals.cs
- ResourceManagerWrapper.cs
- Journal.cs
- GradientBrush.cs
- DataGridTextBoxColumn.cs
- TextEmbeddedObject.cs
- ToolStripItemEventArgs.cs
- SqlServer2KCompatibilityCheck.cs
- QuaternionAnimationUsingKeyFrames.cs
- ForceCopyBuildProvider.cs
- CharUnicodeInfo.cs
- Crc32Helper.cs
- WebPartVerbCollection.cs
- OutputCache.cs
- WebPartConnectionCollection.cs
- RoleGroup.cs
- SessionParameter.cs
- ConnectionProviderAttribute.cs
- SchemaCollectionCompiler.cs
- ServicePoint.cs
- HttpFileCollection.cs
- TypeElement.cs
- CodeDomComponentSerializationService.cs
- CodeMethodReturnStatement.cs
- WrapPanel.cs
- StructuredTypeInfo.cs
- ListViewInsertedEventArgs.cs
- TextLineResult.cs
- Compiler.cs
- MoveSizeWinEventHandler.cs
- SchemaImporterExtensionsSection.cs
- DataGridTextBoxColumn.cs
- SatelliteContractVersionAttribute.cs
- elementinformation.cs
- PropertyChangedEventArgs.cs
- TdsParser.cs
- SafeNativeMethodsCLR.cs
- CleanUpVirtualizedItemEventArgs.cs
- WindowsImpersonationContext.cs
- ParallelForEach.cs
- StyleModeStack.cs
- TemplateManager.cs
- SymLanguageVendor.cs
- ExceptionHandler.cs
- LiteralControl.cs
- SetState.cs
- ThreadPoolTaskScheduler.cs
- Transform3DGroup.cs
- ReliableSessionBindingElementImporter.cs
- TemplateParser.cs
- ArrayExtension.cs
- SequentialUshortCollection.cs
- HttpCapabilitiesEvaluator.cs
- basevalidator.cs
- CookieParameter.cs
- ToolStripProgressBar.cs
- _NestedSingleAsyncResult.cs
- PnrpPermission.cs
- SoapIgnoreAttribute.cs
- TextBoxAutomationPeer.cs
- AttachedPropertyMethodSelector.cs
- SessionPageStatePersister.cs
- DataServiceBehavior.cs
- Blend.cs
- GenerateScriptTypeAttribute.cs
- SqlClientWrapperSmiStream.cs
- SelectionBorderGlyph.cs
- webeventbuffer.cs
- ToolTipService.cs
- RadioButtonList.cs
- XmlSchemaSimpleTypeRestriction.cs
- ResponseStream.cs
- WebBrowserPermission.cs
- Label.cs
- WrappingXamlSchemaContext.cs
- XmlUtf8RawTextWriter.cs
- FocusManager.cs
- DirectoryNotFoundException.cs
- MultiSelectRootGridEntry.cs
- graph.cs
- EncryptedType.cs
- FilterQuery.cs
- HwndStylusInputProvider.cs
- CancelEventArgs.cs
- PasswordTextContainer.cs