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
- DataGridAutoFormatDialog.cs
- XmlElementAttributes.cs
- XPathChildIterator.cs
- SqlHelper.cs
- PropertyDescriptorCollection.cs
- MinMaxParagraphWidth.cs
- ScriptComponentDescriptor.cs
- PointAnimationBase.cs
- GatewayIPAddressInformationCollection.cs
- UnknownWrapper.cs
- MatrixTransform.cs
- BehaviorEditorPart.cs
- FocusWithinProperty.cs
- Repeater.cs
- AdapterDictionary.cs
- DoubleCollectionConverter.cs
- ReflectionServiceProvider.cs
- ExtendedProperty.cs
- RegexStringValidator.cs
- Collection.cs
- CapabilitiesPattern.cs
- TableRow.cs
- ToolboxItemFilterAttribute.cs
- StateBag.cs
- ScriptReference.cs
- ActivityExecutorSurrogate.cs
- DocumentReferenceCollection.cs
- HttpRequestTraceRecord.cs
- ToolStripPanelRow.cs
- ProfileGroupSettings.cs
- ArrayElementGridEntry.cs
- OpenTypeLayoutCache.cs
- InternalUserCancelledException.cs
- SqlStatistics.cs
- xml.cs
- SchemaSetCompiler.cs
- GeneralTransform3DCollection.cs
- TextBoxAutoCompleteSourceConverter.cs
- SimpleMailWebEventProvider.cs
- RemotingException.cs
- ClientEventManager.cs
- NotificationContext.cs
- EncoderNLS.cs
- ReadOnlyHierarchicalDataSourceView.cs
- XamlRtfConverter.cs
- VirtualPath.cs
- OrthographicCamera.cs
- BindableTemplateBuilder.cs
- GridView.cs
- ComponentResourceKeyConverter.cs
- AsyncResult.cs
- TextSegment.cs
- DictationGrammar.cs
- FieldNameLookup.cs
- DocumentViewerHelper.cs
- InstanceKeyCompleteException.cs
- ActivityTypeResolver.xaml.cs
- HtmlImage.cs
- SpeechSeg.cs
- Int32KeyFrameCollection.cs
- WeakReferenceList.cs
- RootBrowserWindowProxy.cs
- NavigationWindowAutomationPeer.cs
- RegexCompilationInfo.cs
- StateBag.cs
- BrowserTree.cs
- BindableTemplateBuilder.cs
- PreProcessor.cs
- Timeline.cs
- PreProcessor.cs
- _SpnDictionary.cs
- RayMeshGeometry3DHitTestResult.cs
- dsa.cs
- ImageFormat.cs
- TrackingMemoryStream.cs
- MailMessageEventArgs.cs
- GeneralTransform3DCollection.cs
- SpecialFolderEnumConverter.cs
- CalendarDayButton.cs
- MissingMethodException.cs
- RadioButtonList.cs
- XmlComplianceUtil.cs
- PlainXmlSerializer.cs
- RegexStringValidator.cs
- Vector3dCollection.cs
- DropShadowBitmapEffect.cs
- SemaphoreFullException.cs
- SqlNodeTypeOperators.cs
- SspiSafeHandles.cs
- NameValueFileSectionHandler.cs
- DelegatingTypeDescriptionProvider.cs
- Control.cs
- DrawingContext.cs
- IxmlLineInfo.cs
- StaticFileHandler.cs
- IssuedTokenClientBehaviorsElementCollection.cs
- FixedSOMTextRun.cs
- XmlSchemaSimpleTypeList.cs
- SamlNameIdentifierClaimResource.cs
- SafeCryptoHandles.cs