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
- Query.cs
- RegexStringValidatorAttribute.cs
- IpcChannelHelper.cs
- SrgsElementFactoryCompiler.cs
- RadioButton.cs
- MemberDescriptor.cs
- RemotingSurrogateSelector.cs
- SqlUserDefinedAggregateAttribute.cs
- HtmlListAdapter.cs
- WorkflowTraceTransfer.cs
- XPathMessageContext.cs
- MsdtcClusterUtils.cs
- CompiledQuery.cs
- ArrayConverter.cs
- MaskedTextProvider.cs
- Propagator.Evaluator.cs
- EntityContainerAssociationSet.cs
- SecurityHeaderElementInferenceEngine.cs
- TagPrefixCollection.cs
- DbDataRecord.cs
- ADMembershipProvider.cs
- DelayedRegex.cs
- DrawTreeNodeEventArgs.cs
- DbDataReader.cs
- DBSqlParserColumn.cs
- PeerName.cs
- GenericParameterDataContract.cs
- ClickablePoint.cs
- FixedPageStructure.cs
- UIPermission.cs
- SecurityKeyIdentifier.cs
- ViewCellRelation.cs
- MenuItemBinding.cs
- IERequestCache.cs
- SmtpLoginAuthenticationModule.cs
- TableColumnCollection.cs
- FolderBrowserDialogDesigner.cs
- InkCanvas.cs
- XPathChildIterator.cs
- XmlWriterDelegator.cs
- RegisteredExpandoAttribute.cs
- ExpressionUtilities.cs
- CodeTryCatchFinallyStatement.cs
- RoleGroupCollection.cs
- URL.cs
- MsmqBindingMonitor.cs
- MultiSelector.cs
- SchemaTypeEmitter.cs
- Cursor.cs
- TextTreeTextNode.cs
- TcpClientChannel.cs
- ImageIndexConverter.cs
- GregorianCalendar.cs
- ClassValidator.cs
- FrameDimension.cs
- HwndTarget.cs
- Mappings.cs
- PathFigure.cs
- IconHelper.cs
- Vector3DConverter.cs
- PermissionAttributes.cs
- Expression.cs
- MonitoringDescriptionAttribute.cs
- PartManifestEntry.cs
- DelegatingStream.cs
- BuildProviderCollection.cs
- ConstraintCollection.cs
- HttpModulesSection.cs
- RectConverter.cs
- ContractMapping.cs
- XmlTextReaderImpl.cs
- RadioButtonRenderer.cs
- SocketException.cs
- XmlSchemaObjectCollection.cs
- ParseChildrenAsPropertiesAttribute.cs
- GeometryGroup.cs
- RootBuilder.cs
- CheckoutException.cs
- SchemaImporterExtensionElementCollection.cs
- VBCodeProvider.cs
- CqlErrorHelper.cs
- ListBox.cs
- RedBlackList.cs
- Drawing.cs
- SqlLiftWhereClauses.cs
- ReachUIElementCollectionSerializer.cs
- BookmarkUndoUnit.cs
- ServerType.cs
- FontCacheLogic.cs
- RedistVersionInfo.cs
- CrossContextChannel.cs
- ComponentGuaranteesAttribute.cs
- InfocardClientCredentials.cs
- XamlSerializerUtil.cs
- MatrixKeyFrameCollection.cs
- SharedPerformanceCounter.cs
- IItemContainerGenerator.cs
- ResourceSet.cs
- Variable.cs
- NameValueConfigurationCollection.cs