Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / wpf / src / Core / CSharp / System / Windows / Media3D / DiffuseMaterial.cs / 1 / DiffuseMaterial.cs
//---------------------------------------------------------------------------- // //// Copyright (C) Microsoft Corporation. All rights reserved. // // // // Description: 3D diffuse material // // See spec at *** FILL IN LATER *** // // History: // 06/25/2003 : t-gregr - Created // 01/28/2005 : jordanpa - Renamed BrushMaterial to DiffuseMaterial // //--------------------------------------------------------------------------- using System; using System.Diagnostics; using System.Runtime.InteropServices; using System.Windows.Markup; using System.Windows.Media; using System.Windows.Media.Animation; using System.Windows.Media.Composition; using MS.Internal; namespace System.Windows.Media.Media3D { ////// DiffuseMaterial allows a 2d brush to be used on a 3d model that has been lit /// with a diffuse lighting model /// public sealed partial class DiffuseMaterial : Material { //----------------------------------------------------- // // Constructors // //----------------------------------------------------- #region Constructors ////// Constructs a DiffuseMaterial /// public DiffuseMaterial() { } ////// Constructor that sets the Brush property to "brush" /// /// The new material's brush public DiffuseMaterial(Brush brush) { Brush = brush; } #endregion Constructors internal override bool PreCompute() { _requiresRealization = Material.PreCompute(Brush); return _requiresRealization; } internal override void UpdateRealizations( RealizationContext ctx, ref Rect bounds ) { Debug.Assert(_requiresRealization); Material.UpdateRealizations(Brush, ctx, ref bounds); } internal override bool RequiresRealization { get { return _requiresRealization; } } //------------------------------------------------------ // // Private Fields // //----------------------------------------------------- #region Private Fields private bool _requiresRealization = false; #endregion Private Fields } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. //---------------------------------------------------------------------------- // //// Copyright (C) Microsoft Corporation. All rights reserved. // // // // Description: 3D diffuse material // // See spec at *** FILL IN LATER *** // // History: // 06/25/2003 : t-gregr - Created // 01/28/2005 : jordanpa - Renamed BrushMaterial to DiffuseMaterial // //--------------------------------------------------------------------------- using System; using System.Diagnostics; using System.Runtime.InteropServices; using System.Windows.Markup; using System.Windows.Media; using System.Windows.Media.Animation; using System.Windows.Media.Composition; using MS.Internal; namespace System.Windows.Media.Media3D { ////// DiffuseMaterial allows a 2d brush to be used on a 3d model that has been lit /// with a diffuse lighting model /// public sealed partial class DiffuseMaterial : Material { //----------------------------------------------------- // // Constructors // //----------------------------------------------------- #region Constructors ////// Constructs a DiffuseMaterial /// public DiffuseMaterial() { } ////// Constructor that sets the Brush property to "brush" /// /// The new material's brush public DiffuseMaterial(Brush brush) { Brush = brush; } #endregion Constructors internal override bool PreCompute() { _requiresRealization = Material.PreCompute(Brush); return _requiresRealization; } internal override void UpdateRealizations( RealizationContext ctx, ref Rect bounds ) { Debug.Assert(_requiresRealization); Material.UpdateRealizations(Brush, ctx, ref bounds); } internal override bool RequiresRealization { get { return _requiresRealization; } } //------------------------------------------------------ // // Private Fields // //----------------------------------------------------- #region Private Fields private bool _requiresRealization = false; #endregion Private Fields } } // 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
- TextBounds.cs
- contentDescriptor.cs
- Rectangle.cs
- FileLoadException.cs
- NetworkCredential.cs
- BasePropertyDescriptor.cs
- QuaternionAnimationBase.cs
- XMLSchema.cs
- PeerUnsafeNativeMethods.cs
- SapiGrammar.cs
- DataGridViewIntLinkedList.cs
- TraceContextEventArgs.cs
- ToggleButton.cs
- XmlSchemaElement.cs
- SqlExpressionNullability.cs
- TrackingStringDictionary.cs
- PairComparer.cs
- ProfileEventArgs.cs
- Brush.cs
- ParentUndoUnit.cs
- DocumentSequence.cs
- ProgressPage.cs
- Pen.cs
- WindowPatternIdentifiers.cs
- FormsAuthenticationEventArgs.cs
- GenericRootAutomationPeer.cs
- HitTestWithPointDrawingContextWalker.cs
- DocumentViewerConstants.cs
- FontFamily.cs
- BaseDataBoundControl.cs
- FixedSOMGroup.cs
- DependencyPropertyChangedEventArgs.cs
- StateMachineSubscriptionManager.cs
- ByteStorage.cs
- _Events.cs
- DeadCharTextComposition.cs
- ObjectItemCollection.cs
- RegexCharClass.cs
- QilReference.cs
- TreeView.cs
- Random.cs
- StrokeNodeData.cs
- OciEnlistContext.cs
- OdbcConnectionOpen.cs
- Scripts.cs
- URLAttribute.cs
- HMACSHA384.cs
- XmlChildEnumerator.cs
- HiddenFieldPageStatePersister.cs
- LexicalChunk.cs
- NamespaceInfo.cs
- CurrentChangingEventManager.cs
- AnchoredBlock.cs
- Grammar.cs
- securestring.cs
- TemplateControlCodeDomTreeGenerator.cs
- BreakSafeBase.cs
- SafeEventLogReadHandle.cs
- SdlChannelSink.cs
- ISAPIApplicationHost.cs
- MessageAction.cs
- ConditionalAttribute.cs
- SettingsPropertyNotFoundException.cs
- MessageBox.cs
- MaskedTextProvider.cs
- ScriptingProfileServiceSection.cs
- UserNameSecurityTokenProvider.cs
- sqlcontext.cs
- DiagnosticTrace.cs
- Span.cs
- NonPrimarySelectionGlyph.cs
- MenuItemAutomationPeer.cs
- DataStreams.cs
- WmlCommandAdapter.cs
- baseaxisquery.cs
- _LazyAsyncResult.cs
- ProviderMetadataCachedInformation.cs
- TableProviderWrapper.cs
- _emptywebproxy.cs
- DateTimePicker.cs
- SQLInt64.cs
- ETagAttribute.cs
- FaultDesigner.cs
- RPIdentityRequirement.cs
- OpenTypeLayout.cs
- CodeActivity.cs
- WebPartEditorOkVerb.cs
- VideoDrawing.cs
- MetadataSerializer.cs
- MsmqAppDomainProtocolHandler.cs
- MissingFieldException.cs
- ServicePointManager.cs
- StylusButtonCollection.cs
- CommandField.cs
- ProfileEventArgs.cs
- SizeValueSerializer.cs
- RowUpdatedEventArgs.cs
- PointCollection.cs
- LogicalExpr.cs
- PipelineModuleStepContainer.cs