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
- HandlerWithFactory.cs
- HttpResponseInternalBase.cs
- LinqDataSourceSelectEventArgs.cs
- KnownTypesHelper.cs
- WSAddressing10ProblemHeaderQNameFault.cs
- MarkedHighlightComponent.cs
- ExpressionBuilderContext.cs
- AlternateViewCollection.cs
- UnicodeEncoding.cs
- CoTaskMemHandle.cs
- TableLayoutPanelCellPosition.cs
- CommandField.cs
- ZipIOEndOfCentralDirectoryBlock.cs
- ApplicationSettingsBase.cs
- FlowLayout.cs
- LinkConverter.cs
- BinaryUtilClasses.cs
- DataGridViewCellContextMenuStripNeededEventArgs.cs
- InstanceNameConverter.cs
- SimpleType.cs
- MouseBinding.cs
- LinkedResourceCollection.cs
- DocumentGrid.cs
- MouseGestureValueSerializer.cs
- TreeNodeSelectionProcessor.cs
- CodeCatchClause.cs
- ReferentialConstraint.cs
- SecurityHelper.cs
- UserPersonalizationStateInfo.cs
- coordinator.cs
- ModuleConfigurationInfo.cs
- BitmapEffect.cs
- BasicHttpSecurityMode.cs
- ErrorWrapper.cs
- Pair.cs
- TextSelectionHighlightLayer.cs
- DBNull.cs
- Attributes.cs
- BitmapSourceSafeMILHandle.cs
- ValidatorCollection.cs
- BookmarkEventArgs.cs
- BuildManager.cs
- WindowsPen.cs
- XsltSettings.cs
- WebBrowser.cs
- MruCache.cs
- CommandEventArgs.cs
- FixedHyperLink.cs
- Base64Encoder.cs
- CodeObjectCreateExpression.cs
- TextAnchor.cs
- CompatibleIComparer.cs
- StubHelpers.cs
- Size.cs
- CanonicalFormWriter.cs
- MethodRental.cs
- ContainerVisual.cs
- HiddenField.cs
- StreamResourceInfo.cs
- OracleBFile.cs
- ErrorActivity.cs
- MTConfigUtil.cs
- FlowDocumentFormatter.cs
- DetailsViewDeleteEventArgs.cs
- SessionPageStatePersister.cs
- XmlCountingReader.cs
- DocumentOrderComparer.cs
- CallContext.cs
- ModifierKeysValueSerializer.cs
- ResolvedKeyFrameEntry.cs
- GroupByExpressionRewriter.cs
- SmtpLoginAuthenticationModule.cs
- SafeNativeMethods.cs
- OraclePermissionAttribute.cs
- EntityDataSourceDataSelection.cs
- DelegateSerializationHolder.cs
- DataGridViewRow.cs
- StyleCollection.cs
- Group.cs
- ProviderMetadataCachedInformation.cs
- CharEnumerator.cs
- ExpressionParser.cs
- PermissionListSet.cs
- ThicknessKeyFrameCollection.cs
- CheckBoxList.cs
- ToolStripStatusLabel.cs
- EntityRecordInfo.cs
- PerformanceCounterLib.cs
- Math.cs
- ValueQuery.cs
- ZipArchive.cs
- TextElementEnumerator.cs
- AsymmetricSecurityProtocolFactory.cs
- EditorOptionAttribute.cs
- DataGridViewSelectedColumnCollection.cs
- Soap.cs
- BaseDataListActionList.cs
- DataGridViewCellStyleContentChangedEventArgs.cs
- AdapterUtil.cs
- MenuEventArgs.cs