Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / 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
- activationcontext.cs
- RegexCode.cs
- ServiceAuthorizationElement.cs
- unitconverter.cs
- TextSearch.cs
- ZipIOExtraField.cs
- EnumValAlphaComparer.cs
- PassportPrincipal.cs
- TextParagraph.cs
- Int32Converter.cs
- securestring.cs
- BindUriHelper.cs
- DoubleLinkList.cs
- ApplicationBuildProvider.cs
- HotSpotCollection.cs
- WriteableOnDemandPackagePart.cs
- RefExpr.cs
- ByteStack.cs
- Size.cs
- ImageMetadata.cs
- WebEvents.cs
- InfoCardMasterKey.cs
- PackageDigitalSignatureManager.cs
- GZipDecoder.cs
- DbBuffer.cs
- AvTraceDetails.cs
- ListCollectionView.cs
- SqlDataSourceAdvancedOptionsForm.cs
- RequestStatusBarUpdateEventArgs.cs
- HealthMonitoringSectionHelper.cs
- InternalPolicyElement.cs
- SqlDataAdapter.cs
- XpsFilter.cs
- PartBasedPackageProperties.cs
- TraceListener.cs
- RuleSettingsCollection.cs
- ContextStack.cs
- TouchesOverProperty.cs
- CodeNamespaceImportCollection.cs
- SyndicationContent.cs
- ElementNotEnabledException.cs
- EdmFunction.cs
- BuilderPropertyEntry.cs
- DocumentViewerConstants.cs
- ToolBarButton.cs
- XmlSchemaInferenceException.cs
- OdbcConnectionPoolProviderInfo.cs
- WindowsUpDown.cs
- BitHelper.cs
- CanonicalFontFamilyReference.cs
- UrlEncodedParameterWriter.cs
- AncestorChangedEventArgs.cs
- WebScriptMetadataInstanceContextProvider.cs
- AppDomainUnloadedException.cs
- ParallelRangeManager.cs
- WorkflowMessageEventHandler.cs
- LayoutEditorPart.cs
- _NTAuthentication.cs
- AutomationElementCollection.cs
- StatusBarDrawItemEvent.cs
- ClassGenerator.cs
- LocatorPart.cs
- NotifyParentPropertyAttribute.cs
- TransformPattern.cs
- Visual3DCollection.cs
- InstanceCreationEditor.cs
- BaseCodePageEncoding.cs
- ServicePoint.cs
- MenuItemCollection.cs
- HighlightComponent.cs
- DomainUpDown.cs
- HtmlLink.cs
- BitmapImage.cs
- WebBrowserPermission.cs
- IndicShape.cs
- ByteKeyFrameCollection.cs
- PasswordBox.cs
- TextServicesContext.cs
- CalendarDay.cs
- WinFormsUtils.cs
- ImageMap.cs
- AuthenticationManager.cs
- NameValueConfigurationCollection.cs
- UrlUtility.cs
- ReadOnlyCollectionBase.cs
- NativeObjectSecurity.cs
- OleDbTransaction.cs
- Bind.cs
- RelatedEnd.cs
- PropertyStore.cs
- CookielessHelper.cs
- KnownAssemblyEntry.cs
- CriticalHandle.cs
- GeneralTransform3DTo2DTo3D.cs
- HierarchicalDataSourceConverter.cs
- StructuredType.cs
- AnonymousIdentificationSection.cs
- DefaultExpression.cs
- Helper.cs
- TextRunCacheImp.cs