Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / wpf / src / Core / CSharp / System / Windows / Media / SkewTransform.cs / 1 / 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
- PersistChildrenAttribute.cs
- GuidelineCollection.cs
- CLSCompliantAttribute.cs
- StrongNameKeyPair.cs
- XmlAutoDetectWriter.cs
- ThemeDirectoryCompiler.cs
- EraserBehavior.cs
- UnionCodeGroup.cs
- DefaultProxySection.cs
- AccessorTable.cs
- FormatConvertedBitmap.cs
- ScriptingScriptResourceHandlerSection.cs
- DataSysAttribute.cs
- Int32Converter.cs
- FontDifferentiator.cs
- DataServiceExpressionVisitor.cs
- ResourceReader.cs
- HotSpotCollection.cs
- CmsInterop.cs
- SoapCommonClasses.cs
- GridItemProviderWrapper.cs
- WebUtil.cs
- GlyphShapingProperties.cs
- ModelItemDictionaryImpl.cs
- OptimalBreakSession.cs
- SendMailErrorEventArgs.cs
- DeflateStream.cs
- DataMemberConverter.cs
- WebBrowserNavigatedEventHandler.cs
- BigInt.cs
- SqlDataSourceQuery.cs
- DataTableReaderListener.cs
- CodeSnippetStatement.cs
- PermissionSetTriple.cs
- ConfigurationStrings.cs
- SqlVersion.cs
- RenderData.cs
- Html32TextWriter.cs
- MeshGeometry3D.cs
- Number.cs
- DynamicObjectAccessor.cs
- SqlCommandBuilder.cs
- RsaSecurityKey.cs
- PeerInvitationResponse.cs
- NativeMethods.cs
- EmptyQuery.cs
- EntityPropertyMappingAttribute.cs
- GridViewColumnHeader.cs
- HtmlInputButton.cs
- PlaceHolder.cs
- PublishLicense.cs
- TableAutomationPeer.cs
- TemplateBindingExpression.cs
- UpdateProgress.cs
- TabControl.cs
- DebugControllerThread.cs
- DmlSqlGenerator.cs
- StylusPointProperty.cs
- CallbackDebugBehavior.cs
- MulticastOption.cs
- DataPagerField.cs
- ErrorsHelper.cs
- typedescriptorpermission.cs
- ListBoxItem.cs
- CurrentTimeZone.cs
- Serializer.cs
- XmlAttributes.cs
- GraphicsState.cs
- Button.cs
- InputLanguageManager.cs
- DrawingAttributes.cs
- XmlReflectionImporter.cs
- VectorKeyFrameCollection.cs
- ObjectCloneHelper.cs
- LocationReference.cs
- XamlReaderHelper.cs
- StorageComplexTypeMapping.cs
- ResourcePermissionBase.cs
- MobileDeviceCapabilitiesSectionHandler.cs
- ToolStripMenuItem.cs
- InvalidCastException.cs
- KeyGestureConverter.cs
- CaseStatement.cs
- MaskInputRejectedEventArgs.cs
- BooleanFacetDescriptionElement.cs
- SoapTransportImporter.cs
- SymbolTable.cs
- TableItemPattern.cs
- WebServiceParameterData.cs
- SortQueryOperator.cs
- DbUpdateCommandTree.cs
- FixedDocumentPaginator.cs
- FormsAuthenticationUser.cs
- TextBox.cs
- GorillaCodec.cs
- WmlPageAdapter.cs
- ButtonFieldBase.cs
- EnlistmentState.cs
- JsonSerializer.cs
- XmlWriterDelegator.cs