Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Core / CSharp / System / Windows / Media / SkewTransform.cs / 1305600 / 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
- StylusPlugin.cs
- ProviderUtil.cs
- ColumnPropertiesGroup.cs
- WindowsNonControl.cs
- HorizontalAlignConverter.cs
- ConfigurationManager.cs
- ButtonBase.cs
- SimpleTypeResolver.cs
- SystemIPInterfaceStatistics.cs
- unitconverter.cs
- ImpersonationContext.cs
- NativeMethodsCLR.cs
- XmlMapping.cs
- DesignerDataSourceView.cs
- JumpItem.cs
- LockedHandleGlyph.cs
- PropertyValidationContext.cs
- SqlCommandSet.cs
- HttpHandlersSection.cs
- FontUnit.cs
- SolidColorBrush.cs
- IpcChannelHelper.cs
- HMACSHA512.cs
- DBSqlParserTable.cs
- RectangleF.cs
- StructuralCache.cs
- KeyedPriorityQueue.cs
- SoapElementAttribute.cs
- PlainXmlSerializer.cs
- EdmComplexTypeAttribute.cs
- InstanceCompleteException.cs
- BasicHttpSecurityElement.cs
- ipaddressinformationcollection.cs
- TraceEventCache.cs
- BindingWorker.cs
- TransportOutputChannel.cs
- storepermissionattribute.cs
- ShaderRenderModeValidation.cs
- GenericWebPart.cs
- StsCommunicationException.cs
- WebBrowserEvent.cs
- OutKeywords.cs
- _TLSstream.cs
- EdmComplexTypeAttribute.cs
- BufferedStream2.cs
- RijndaelManaged.cs
- KeyEvent.cs
- DesignUtil.cs
- MetadataException.cs
- HttpGetClientProtocol.cs
- DataGridCommandEventArgs.cs
- ClientRoleProvider.cs
- TemplateColumn.cs
- DateTimeFormatInfoScanner.cs
- WebPartConnectionCollection.cs
- DataControlFieldCollection.cs
- ReflectionTypeLoadException.cs
- ExpandableObjectConverter.cs
- HttpCookiesSection.cs
- DocumentPageViewAutomationPeer.cs
- LineServices.cs
- DmlSqlGenerator.cs
- InteropTrackingRecord.cs
- ToolStripInSituService.cs
- IEnumerable.cs
- InputLangChangeEvent.cs
- SafeBitVector32.cs
- SctClaimSerializer.cs
- DataGridPageChangedEventArgs.cs
- AnnotationAdorner.cs
- TextTreeUndo.cs
- DocumentSequenceHighlightLayer.cs
- SecurityTokenAttachmentMode.cs
- MemberAccessException.cs
- LinearGradientBrush.cs
- SecurityTokenProvider.cs
- ChangeInterceptorAttribute.cs
- KeyNotFoundException.cs
- ViewCellSlot.cs
- AccessibilityApplicationManager.cs
- RenderContext.cs
- HttpProcessUtility.cs
- EntityCollection.cs
- Quad.cs
- GraphicsContainer.cs
- DataControlLinkButton.cs
- RecordManager.cs
- ProtectedConfigurationSection.cs
- SmiMetaDataProperty.cs
- RuntimeVariablesExpression.cs
- SchemaMapping.cs
- FormViewPagerRow.cs
- ZoneMembershipCondition.cs
- EventProviderTraceListener.cs
- Monitor.cs
- ListenerPerfCounters.cs
- TimelineGroup.cs
- MatrixTransform.cs
- DPCustomTypeDescriptor.cs
- OuterGlowBitmapEffect.cs