Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Core / CSharp / System / Windows / Media / RotateTransform.cs / 1305600 / RotateTransform.cs
//------------------------------------------------------------------------------
// Microsoft Avalon
// Copyright (c) Microsoft Corporation, 2001
//
// File: RotateTransform.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 rotation transformation in degrees.
///
public sealed partial class RotateTransform : Transform
{
///
///
///
public RotateTransform()
{
}
///
/// Create a rotation transformation in degrees.
///
///The angle of rotation in degrees.
public RotateTransform(double angle)
{
Angle = angle;
}
///
/// Create a rotation transformation in degrees.
///
public RotateTransform(
double angle,
double centerX,
double centerY
) : this(angle)
{
CenterX = centerX;
CenterY = centerY;
}
///
/// Return the current transformation value.
///
public override Matrix Value
{
get
{
ReadPreamble();
Matrix m = new Matrix();
m.RotateAt(Angle, CenterX, CenterY);
return m;
}
}
///
/// Returns true if transformation matches the identity transform.
///
internal override bool IsIdentity
{
get
{
return Angle == 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: RotateTransform.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 rotation transformation in degrees.
///
public sealed partial class RotateTransform : Transform
{
///
///
///
public RotateTransform()
{
}
///
/// Create a rotation transformation in degrees.
///
///The angle of rotation in degrees.
public RotateTransform(double angle)
{
Angle = angle;
}
///
/// Create a rotation transformation in degrees.
///
public RotateTransform(
double angle,
double centerX,
double centerY
) : this(angle)
{
CenterX = centerX;
CenterY = centerY;
}
///
/// Return the current transformation value.
///
public override Matrix Value
{
get
{
ReadPreamble();
Matrix m = new Matrix();
m.RotateAt(Angle, CenterX, CenterY);
return m;
}
}
///
/// Returns true if transformation matches the identity transform.
///
internal override bool IsIdentity
{
get
{
return Angle == 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
- HostVisual.cs
- XamlReader.cs
- MatchingStyle.cs
- IPAddress.cs
- CategoryState.cs
- SectionUpdates.cs
- WrapPanel.cs
- DispatcherEventArgs.cs
- baseaxisquery.cs
- COM2IDispatchConverter.cs
- GridItem.cs
- SqlPersistenceWorkflowInstanceDescription.cs
- SiteIdentityPermission.cs
- ZipIOFileItemStream.cs
- StatementContext.cs
- ICollection.cs
- PreProcessor.cs
- DataObjectSettingDataEventArgs.cs
- FindResponse.cs
- AssociationTypeEmitter.cs
- X509ChainElement.cs
- SelectedDatesCollection.cs
- PropertyExpression.cs
- UnsafeNativeMethodsCLR.cs
- AlphabeticalEnumConverter.cs
- documentsequencetextcontainer.cs
- Validator.cs
- OpCodes.cs
- StateItem.cs
- SelectedDatesCollection.cs
- NamespaceImport.cs
- CounterCreationData.cs
- SystemGatewayIPAddressInformation.cs
- SslStreamSecurityElement.cs
- RootDesignerSerializerAttribute.cs
- ScriptServiceAttribute.cs
- ArraySortHelper.cs
- Variable.cs
- InfoCardRSACryptoProvider.cs
- SetterBase.cs
- XmlReaderSettings.cs
- MemoryFailPoint.cs
- Cursors.cs
- VerticalAlignConverter.cs
- PolicyLevel.cs
- NonParentingControl.cs
- XmlHierarchicalEnumerable.cs
- PathTooLongException.cs
- StreamGeometryContext.cs
- OutputScopeManager.cs
- ToolStripScrollButton.cs
- WmpBitmapEncoder.cs
- ChineseLunisolarCalendar.cs
- XmlSchemaImporter.cs
- RoutedCommand.cs
- TablePattern.cs
- TransformerConfigurationWizardBase.cs
- EnumerationRangeValidationUtil.cs
- UIElementHelper.cs
- BitmapSourceSafeMILHandle.cs
- DataGridViewSelectedCellCollection.cs
- DataGridViewTopRowAccessibleObject.cs
- LineServicesRun.cs
- XmlDomTextWriter.cs
- WebHostScriptMappingsInstallComponent.cs
- WindowsFormsLinkLabel.cs
- AssemblyName.cs
- DataTemplateKey.cs
- GPStream.cs
- QilPatternVisitor.cs
- MessageBuilder.cs
- XmlQualifiedName.cs
- TextTreeFixupNode.cs
- VerificationAttribute.cs
- NonClientArea.cs
- RouteValueExpressionBuilder.cs
- SynchronizationContext.cs
- M3DUtil.cs
- localization.cs
- ServiceHostFactory.cs
- MediaElementAutomationPeer.cs
- TextDocumentView.cs
- ApplicationInfo.cs
- VariableModifiersHelper.cs
- PKCS1MaskGenerationMethod.cs
- DiscreteKeyFrames.cs
- StorageAssociationTypeMapping.cs
- XmlSchemaAttributeGroupRef.cs
- SpellerError.cs
- Mutex.cs
- InstanceDescriptor.cs
- SpeechSynthesizer.cs
- MemberProjectionIndex.cs
- DuplicateWaitObjectException.cs
- HwndTarget.cs
- ImportStoreException.cs
- FileDataSourceCache.cs
- IDReferencePropertyAttribute.cs
- DropSource.cs
- JumpTask.cs