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
- SortDescriptionCollection.cs
- Typography.cs
- HeaderedContentControl.cs
- CodeSnippetExpression.cs
- LineVisual.cs
- KeyBinding.cs
- StickyNoteHelper.cs
- FileAuthorizationModule.cs
- IndentedWriter.cs
- String.cs
- DBSqlParserTableCollection.cs
- EntityDataSourceSelectingEventArgs.cs
- MethodRental.cs
- Gdiplus.cs
- EnumerableCollectionView.cs
- PropertyCondition.cs
- SqlDataSourceCommandEventArgs.cs
- ActivityExecutor.cs
- XmlSerializerImportOptions.cs
- altserialization.cs
- GenericPrincipal.cs
- PrimitiveXmlSerializers.cs
- TextureBrush.cs
- DbCommandTree.cs
- TimeZone.cs
- HtmlTableCell.cs
- DocumentApplicationState.cs
- ToolStripDropDownButton.cs
- EarlyBoundInfo.cs
- PowerModeChangedEventArgs.cs
- Parser.cs
- XmlTextAttribute.cs
- AffineTransform3D.cs
- GeneralTransformGroup.cs
- UpDownBase.cs
- NativeMethodsCLR.cs
- DefaultSerializationProviderAttribute.cs
- RegisteredExpandoAttribute.cs
- ResolveCriteriaApril2005.cs
- HttpFileCollection.cs
- ClockController.cs
- NumberFormatInfo.cs
- WebPartConnectionCollection.cs
- SelectorItemAutomationPeer.cs
- ProfileEventArgs.cs
- ParameterBuilder.cs
- PointLight.cs
- ParallelEnumerable.cs
- Compiler.cs
- GiveFeedbackEventArgs.cs
- XmlNodeReader.cs
- CompoundFileDeflateTransform.cs
- DetailsViewUpdateEventArgs.cs
- BufferedWebEventProvider.cs
- Odbc32.cs
- HostingPreferredMapPath.cs
- MenuItemStyleCollectionEditor.cs
- NotConverter.cs
- SamlAttribute.cs
- XPathCompileException.cs
- BasicSecurityProfileVersion.cs
- XmlSchemaComplexContent.cs
- SafeMarshalContext.cs
- RemoteWebConfigurationHost.cs
- SchemaNames.cs
- Query.cs
- XmlSchemaCollection.cs
- BinHexEncoding.cs
- AutomationPatternInfo.cs
- Types.cs
- VariableAction.cs
- ClockController.cs
- ControlParameter.cs
- TreeSet.cs
- FlowPosition.cs
- DesigntimeLicenseContext.cs
- XmlDocumentType.cs
- NamespaceEmitter.cs
- SubMenuStyleCollection.cs
- TextElementEnumerator.cs
- SqlStatistics.cs
- GroupBoxDesigner.cs
- ConfigurationSection.cs
- CallSiteHelpers.cs
- AssociationType.cs
- GetWinFXPath.cs
- XmlToDatasetMap.cs
- EventLogHandle.cs
- WebPartConnectionCollection.cs
- IIS7UserPrincipal.cs
- DataGridViewColumnEventArgs.cs
- XmlSchemaInfo.cs
- IdentityManager.cs
- DirectionalLight.cs
- ModuleElement.cs
- Soap12ProtocolImporter.cs
- PropertyMetadata.cs
- ProfilePropertyMetadata.cs
- Rule.cs
- LineUtil.cs