Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / 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
- DataListGeneralPage.cs
- ImageButton.cs
- DigestTraceRecordHelper.cs
- XmlSchemaGroupRef.cs
- FontStretchConverter.cs
- DiscriminatorMap.cs
- OneOfElement.cs
- Array.cs
- RotateTransform3D.cs
- WebPartZoneCollection.cs
- JsonDeserializer.cs
- WindowsFormsHostAutomationPeer.cs
- Italic.cs
- SmiContextFactory.cs
- figurelengthconverter.cs
- WindowsFormsSynchronizationContext.cs
- Style.cs
- TraceProvider.cs
- ReturnValue.cs
- NCryptSafeHandles.cs
- InputBinder.cs
- SqlCacheDependency.cs
- ElementAtQueryOperator.cs
- SortDescription.cs
- SubordinateTransaction.cs
- TextEditorThreadLocalStore.cs
- LineMetrics.cs
- OdbcEnvironmentHandle.cs
- LineSegment.cs
- RMPermissions.cs
- NotificationContext.cs
- RemoteWebConfigurationHost.cs
- PkcsMisc.cs
- ObjectHelper.cs
- SqlUDTStorage.cs
- OracleTimeSpan.cs
- TableDetailsRow.cs
- SelectionBorderGlyph.cs
- RelationshipNavigation.cs
- ProfileManager.cs
- AppDomainGrammarProxy.cs
- CharacterString.cs
- Utilities.cs
- XsltSettings.cs
- XmlCharCheckingWriter.cs
- SimpleHandlerFactory.cs
- InternalConfigEventArgs.cs
- ForeignKeyConstraint.cs
- DataTemplateSelector.cs
- TaiwanCalendar.cs
- UserControlAutomationPeer.cs
- RequiredFieldValidator.cs
- PageParserFilter.cs
- GridViewRowEventArgs.cs
- SecurityTokenProviderContainer.cs
- XmlNamespaceDeclarationsAttribute.cs
- CodeMethodInvokeExpression.cs
- BitmapEffect.cs
- RelationshipEnd.cs
- XmlTextReaderImpl.cs
- DetailsViewRowCollection.cs
- BindStream.cs
- XamlBuildTaskServices.cs
- XPathSelfQuery.cs
- BamlResourceContent.cs
- DataException.cs
- HttpModuleCollection.cs
- AnonymousIdentificationSection.cs
- TransformerTypeCollection.cs
- DesignerActionUIService.cs
- TreeViewItem.cs
- MenuScrollingVisibilityConverter.cs
- DecoratedNameAttribute.cs
- WebConvert.cs
- RouteUrlExpressionBuilder.cs
- Codec.cs
- DecoderReplacementFallback.cs
- StringConverter.cs
- OptionUsage.cs
- StructureChangedEventArgs.cs
- ObjectStateManager.cs
- InstanceCreationEditor.cs
- SQLResource.cs
- TrackingServices.cs
- OleDbPropertySetGuid.cs
- AutoGeneratedField.cs
- PropertyEmitter.cs
- RoleServiceManager.cs
- X509UI.cs
- Atom10FormatterFactory.cs
- DynamicControlParameter.cs
- XmlSchemaSimpleContentExtension.cs
- Journaling.cs
- DrawingContextDrawingContextWalker.cs
- AdCreatedEventArgs.cs
- WorkflowInspectionServices.cs
- WhitespaceRuleLookup.cs
- ThumbAutomationPeer.cs
- FixedPage.cs
- GeometryConverter.cs