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
- PriorityBindingExpression.cs
- Variant.cs
- TagPrefixCollection.cs
- MessageBox.cs
- RectangleConverter.cs
- Metafile.cs
- TrackingLocation.cs
- Permission.cs
- MultiDataTrigger.cs
- RectKeyFrameCollection.cs
- OverrideMode.cs
- TreeNodeMouseHoverEvent.cs
- CodeAccessPermission.cs
- TogglePattern.cs
- BrowserCapabilitiesCodeGenerator.cs
- UnauthorizedAccessException.cs
- SecurityTokenSerializer.cs
- EdmItemError.cs
- SelectorItemAutomationPeer.cs
- GeometryGroup.cs
- PreviousTrackingServiceAttribute.cs
- UInt16Storage.cs
- COM2ExtendedUITypeEditor.cs
- ContextMenuService.cs
- DirectoryLocalQuery.cs
- StructuralType.cs
- KeyFrames.cs
- DbException.cs
- FontStyle.cs
- SafeBitVector32.cs
- CancelEventArgs.cs
- BaseTreeIterator.cs
- FontCollection.cs
- AvTraceDetails.cs
- HttpNamespaceReservationInstallComponent.cs
- PassportAuthenticationEventArgs.cs
- PositiveTimeSpanValidator.cs
- Security.cs
- AssociationSet.cs
- StructuredTypeInfo.cs
- CaseInsensitiveHashCodeProvider.cs
- ActivitySurrogate.cs
- XmlIlVisitor.cs
- NestPullup.cs
- NegationPusher.cs
- SplitterPanel.cs
- ResXBuildProvider.cs
- VersionPair.cs
- StringComparer.cs
- HttpsHostedTransportConfiguration.cs
- KeyFrames.cs
- PolyBezierSegment.cs
- ProcessStartInfo.cs
- MultipleViewPattern.cs
- SHA1Managed.cs
- Win32MouseDevice.cs
- TableRowCollection.cs
- ObjectAnimationBase.cs
- HtmlTableCell.cs
- Menu.cs
- SrgsToken.cs
- MarkupObject.cs
- IDataContractSurrogate.cs
- StreamResourceInfo.cs
- WebConfigurationManager.cs
- SettingsPropertyValue.cs
- TextRunCache.cs
- ConfigXmlElement.cs
- MouseBinding.cs
- GridViewSelectEventArgs.cs
- CLRBindingWorker.cs
- LifetimeMonitor.cs
- CorrelationToken.cs
- SystemBrushes.cs
- InkCollectionBehavior.cs
- TextSyndicationContentKindHelper.cs
- WinFormsUtils.cs
- EditorPartChrome.cs
- DBDataPermissionAttribute.cs
- DesignerSerializationVisibilityAttribute.cs
- IList.cs
- LogEntryHeaderDeserializer.cs
- XmlSchemaIdentityConstraint.cs
- WCFBuildProvider.cs
- PagedDataSource.cs
- ThousandthOfEmRealPoints.cs
- StagingAreaInputItem.cs
- FormatterServices.cs
- SqlSelectClauseBuilder.cs
- BamlBinaryReader.cs
- AutoGeneratedFieldProperties.cs
- Run.cs
- ObjectListComponentEditor.cs
- InternalResources.cs
- DataGridViewTopRowAccessibleObject.cs
- BypassElement.cs
- BuildResult.cs
- TerminateWorkflow.cs
- SchemaMapping.cs
- FolderBrowserDialog.cs