Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Core / CSharp / System / Windows / Media3D / ScaleTransform3D.cs / 1305600 / ScaleTransform3D.cs
//---------------------------------------------------------------------------- // //// Copyright (C) Microsoft Corporation. All rights reserved. // // // // Description: 3D scale transformation. // // See spec at http://avalon/medialayer/Specifications/Avalon3D%20API%20Spec.mht // // History: // 06/04/2003 : t-gregr - Created // //--------------------------------------------------------------------------- using System; using System.Windows.Media; using System.Windows.Media.Animation; using System.Windows.Media.Composition; using MS.Internal; using System.ComponentModel.Design.Serialization; using System.Windows.Markup; namespace System.Windows.Media.Media3D { ////// 3D scale transform. /// public sealed partial class ScaleTransform3D : AffineTransform3D { //----------------------------------------------------- // // Constructors // //----------------------------------------------------- #region Constructors ////// Default constructor. /// public ScaleTransform3D() {} ////// Constructor. /// public ScaleTransform3D(Vector3D scale) { ScaleX = scale.X; ScaleY = scale.Y; ScaleZ = scale.Z; } ////// Constructor. /// public ScaleTransform3D(double scaleX, double scaleY, double scaleZ) { ScaleX = scaleX; ScaleY = scaleY; ScaleZ = scaleZ; } ////// Constructor. /// public ScaleTransform3D(Vector3D scale, Point3D center) { ScaleX = scale.X; ScaleY = scale.Y; ScaleZ = scale.Z; CenterX = center.X; CenterY = center.Y; CenterZ = center.Z; } ////// Constructor. /// public ScaleTransform3D(double scaleX, double scaleY, double scaleZ, double centerX, double centerY, double centerZ) { ScaleX = scaleX; ScaleY = scaleY; ScaleZ = scaleZ; CenterX = centerX; CenterY = centerY; CenterZ = centerZ; } #endregion Constructors //------------------------------------------------------ // // Public Methods // //----------------------------------------------------- //------------------------------------------------------ // // Public Properties // //------------------------------------------------------ #region Public Properties ////// Retrieves matrix representation of this transform. /// public override Matrix3D Value { get { ReadPreamble(); Matrix3D matrix = new Matrix3D(); Append(ref matrix); return matrix; } } #endregion Public Properties internal override void Append(ref Matrix3D matrix) { Vector3D scale = new Vector3D(_cachedScaleXValue, _cachedScaleYValue, _cachedScaleZValue); if (_cachedCenterXValue == 0.0 && _cachedCenterYValue == 0.0 && _cachedCenterZValue == 0.0) { matrix.Scale(scale); } else { matrix.ScaleAt(scale, new Point3D(_cachedCenterXValue, _cachedCenterYValue, _cachedCenterZValue)); } } } } // 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
- DrawListViewItemEventArgs.cs
- util.cs
- PostBackOptions.cs
- EncoderFallback.cs
- FixedDocument.cs
- HtmlTableCellCollection.cs
- ListControl.cs
- PropertyGridEditorPart.cs
- ListSortDescriptionCollection.cs
- AttributeUsageAttribute.cs
- DefaultHttpHandler.cs
- SqlDataReaderSmi.cs
- ColorMatrix.cs
- InternalBufferOverflowException.cs
- Deserializer.cs
- CachingHintValidation.cs
- DiagnosticsConfigurationHandler.cs
- SymmetricKey.cs
- WebPartPersonalization.cs
- ListBoxAutomationPeer.cs
- Signature.cs
- SplashScreen.cs
- StringArrayConverter.cs
- HtmlUtf8RawTextWriter.cs
- SerializationSectionGroup.cs
- Brush.cs
- IfElseDesigner.xaml.cs
- XmlSchemaSet.cs
- DataGridViewCellValidatingEventArgs.cs
- SqlInternalConnection.cs
- MultipleViewProviderWrapper.cs
- DBDataPermissionAttribute.cs
- AutomationAttributeInfo.cs
- KeyedCollection.cs
- MobileUITypeEditor.cs
- SiteMapNodeItem.cs
- GridViewSelectEventArgs.cs
- StyleBamlTreeBuilder.cs
- TextEditorMouse.cs
- MD5.cs
- NamedObject.cs
- MessageSecurityException.cs
- DefaultValueConverter.cs
- RemotingException.cs
- DependencyObjectType.cs
- HttpPostServerProtocol.cs
- MarkupObject.cs
- RoutedCommand.cs
- GridViewCommandEventArgs.cs
- JsonEnumDataContract.cs
- DataGridViewCellValidatingEventArgs.cs
- UITypeEditors.cs
- CodeComment.cs
- ComponentChangedEvent.cs
- CodeActivityContext.cs
- ExtensionFile.cs
- ColumnMapVisitor.cs
- DataIdProcessor.cs
- ScrollPatternIdentifiers.cs
- AllowedAudienceUriElement.cs
- SoapBinding.cs
- Int64Storage.cs
- Cursor.cs
- AssemblyFilter.cs
- UdpDiscoveryEndpoint.cs
- Animatable.cs
- SqlServer2KCompatibilityAnnotation.cs
- path.cs
- XmlQueryType.cs
- DataBindingHandlerAttribute.cs
- SystemWebCachingSectionGroup.cs
- RsaSecurityKey.cs
- ExpressionWriter.cs
- DecoderNLS.cs
- PixelShader.cs
- KerberosTicketHashIdentifierClause.cs
- M3DUtil.cs
- CacheAxisQuery.cs
- FixedDocumentPaginator.cs
- PageAsyncTask.cs
- RowsCopiedEventArgs.cs
- Stackframe.cs
- InputScopeManager.cs
- VerificationAttribute.cs
- Types.cs
- RegexMatch.cs
- PassportAuthenticationModule.cs
- PropertyTabChangedEvent.cs
- ApplicationProxyInternal.cs
- BindingMemberInfo.cs
- ListBoxItemWrapperAutomationPeer.cs
- GridViewSelectEventArgs.cs
- GridViewCancelEditEventArgs.cs
- BrushConverter.cs
- DataPagerFieldItem.cs
- SplineKeyFrames.cs
- Adorner.cs
- PeerEndPoint.cs
- ModelPerspective.cs
- MinimizableAttributeTypeConverter.cs