Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / wpf / src / Core / CSharp / System / Windows / Media / RotateTransform.cs / 1 / 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
- XmlTextReaderImpl.cs
- DataSourceControlBuilder.cs
- DbgCompiler.cs
- StateBag.cs
- PolicyUnit.cs
- Process.cs
- ContextMenuStrip.cs
- ClockController.cs
- SearchForVirtualItemEventArgs.cs
- Span.cs
- ManualResetEvent.cs
- OracleParameterCollection.cs
- RelationshipSet.cs
- GlobalizationAssembly.cs
- TreeViewCancelEvent.cs
- Cloud.cs
- PipeSecurity.cs
- FontUnitConverter.cs
- Quaternion.cs
- StringArrayEditor.cs
- ToolZone.cs
- TraceContext.cs
- Context.cs
- BitmapEditor.cs
- PhysicalAddress.cs
- DtrList.cs
- SmtpTransport.cs
- storagemappingitemcollection.viewdictionary.cs
- AttributeUsageAttribute.cs
- NativeObjectSecurity.cs
- TickBar.cs
- DbMetaDataFactory.cs
- ArglessEventHandlerProxy.cs
- PatternMatchRules.cs
- ParsedAttributeCollection.cs
- HierarchicalDataSourceControl.cs
- RuleRef.cs
- Utils.cs
- DurationConverter.cs
- PenContexts.cs
- PlatformCulture.cs
- TreeNodeStyleCollectionEditor.cs
- FormView.cs
- DataBindingCollection.cs
- BamlRecords.cs
- KnownTypes.cs
- SqlCachedBuffer.cs
- TemplatePartAttribute.cs
- AttachedPropertyBrowsableForTypeAttribute.cs
- ReturnEventArgs.cs
- DBPropSet.cs
- UrlAuthFailedErrorFormatter.cs
- CreateParams.cs
- XmlNotation.cs
- HiddenFieldPageStatePersister.cs
- RuleInfoComparer.cs
- DateTimeSerializationSection.cs
- TransformerInfo.cs
- XmlRawWriter.cs
- ScrollItemPatternIdentifiers.cs
- ItemDragEvent.cs
- AudioStateChangedEventArgs.cs
- EmissiveMaterial.cs
- NavigationFailedEventArgs.cs
- Predicate.cs
- BrowserCapabilitiesCodeGenerator.cs
- DataControlButton.cs
- WebPartConnectionsCancelVerb.cs
- EventLogPermissionEntryCollection.cs
- ProcessHostMapPath.cs
- DataGridCommandEventArgs.cs
- XamlReader.cs
- DocumentPage.cs
- StrokeFIndices.cs
- WebConfigurationHost.cs
- SimpleType.cs
- WebDescriptionAttribute.cs
- OutputCache.cs
- AstTree.cs
- DataExchangeServiceBinder.cs
- LineServicesRun.cs
- MailAddressCollection.cs
- CompositeKey.cs
- SystemFonts.cs
- XPathCompileException.cs
- ComplexObject.cs
- ALinqExpressionVisitor.cs
- ViewManagerAttribute.cs
- Label.cs
- odbcmetadatafactory.cs
- Process.cs
- GridViewCellAutomationPeer.cs
- FormViewDeletedEventArgs.cs
- util.cs
- XsdCachingReader.cs
- pingexception.cs
- StringHelper.cs
- RegistryDataKey.cs
- HtmlObjectListAdapter.cs
- FileSecurity.cs