Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / wpf / src / Core / CSharp / System / Windows / Media3D / EmissiveMaterial.cs / 1 / EmissiveMaterial.cs
//---------------------------------------------------------------------------- // //// Copyright (C) Microsoft Corporation. All rights reserved. // // // // Description: 3D emissive material // // See spec at *** FILL IN LATER *** // //--------------------------------------------------------------------------- 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 { ////// EmissiveMaterial allows a 2d brush to be used on a 3d model that has been lit /// as if it were emitting light equal to the color of the brush /// public sealed partial class EmissiveMaterial : Material { //----------------------------------------------------- // // Constructors // //----------------------------------------------------- #region Constructors ////// Constructs a EmissiveMaterial /// public EmissiveMaterial() { } ////// Constructor that sets the Brush property to "brush" /// /// The new material's brush public EmissiveMaterial(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 emissive material // // See spec at *** FILL IN LATER *** // //--------------------------------------------------------------------------- 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 { ////// EmissiveMaterial allows a 2d brush to be used on a 3d model that has been lit /// as if it were emitting light equal to the color of the brush /// public sealed partial class EmissiveMaterial : Material { //----------------------------------------------------- // // Constructors // //----------------------------------------------------- #region Constructors ////// Constructs a EmissiveMaterial /// public EmissiveMaterial() { } ////// Constructor that sets the Brush property to "brush" /// /// The new material's brush public EmissiveMaterial(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
- SetState.cs
- ContentControl.cs
- FileDialog.cs
- TracingConnection.cs
- VisualBasicHelper.cs
- StreamGeometry.cs
- RemotingConfiguration.cs
- WebBrowserNavigatingEventHandler.cs
- ToolStripContextMenu.cs
- XmlDataLoader.cs
- base64Transforms.cs
- DataGridViewColumnStateChangedEventArgs.cs
- FormViewCommandEventArgs.cs
- IPEndPoint.cs
- TypeToken.cs
- Point3DKeyFrameCollection.cs
- DesignerCategoryAttribute.cs
- storepermissionattribute.cs
- Environment.cs
- TextEditorThreadLocalStore.cs
- HttpValueCollection.cs
- TableLayout.cs
- DynamicHyperLink.cs
- StandardCommands.cs
- NoneExcludedImageIndexConverter.cs
- OleDbConnectionInternal.cs
- EnumType.cs
- ProcessModelInfo.cs
- CompositeCollection.cs
- InputScope.cs
- FunctionQuery.cs
- HtmlAnchor.cs
- CapabilitiesRule.cs
- Point3DKeyFrameCollection.cs
- ArgumentOutOfRangeException.cs
- DurableDispatcherAddressingFault.cs
- BitVector32.cs
- OutputCacheProfile.cs
- FormatVersion.cs
- SqlDependency.cs
- FunctionImportMapping.ReturnTypeRenameMapping.cs
- EditorPart.cs
- iisPickupDirectory.cs
- DataTemplateKey.cs
- HostProtectionPermission.cs
- CustomErrorCollection.cs
- AssemblyInfo.cs
- GeometryHitTestResult.cs
- StateDesigner.CommentLayoutGlyph.cs
- OverlappedAsyncResult.cs
- PropertyGeneratedEventArgs.cs
- LocalValueEnumerator.cs
- CalendarDesigner.cs
- ExitEventArgs.cs
- ListBoxItem.cs
- DataPagerCommandEventArgs.cs
- PlainXmlWriter.cs
- ServicePoint.cs
- HelloMessage11.cs
- MarshalDirectiveException.cs
- InitiatorSessionSymmetricMessageSecurityProtocol.cs
- CalendarDataBindingHandler.cs
- VirtualDirectoryMapping.cs
- CodeEntryPointMethod.cs
- StopRoutingHandler.cs
- CommonObjectSecurity.cs
- OutputCacheProfileCollection.cs
- XPathParser.cs
- TextEndOfLine.cs
- NumberFunctions.cs
- DataTablePropertyDescriptor.cs
- FacetEnabledSchemaElement.cs
- SizeLimitedCache.cs
- UIInitializationException.cs
- TypeSystem.cs
- CodeValidator.cs
- IgnoreDataMemberAttribute.cs
- InstanceCreationEditor.cs
- SystemFonts.cs
- ProfileModule.cs
- Error.cs
- RefType.cs
- DtdParser.cs
- BindingContext.cs
- ContractHandle.cs
- CompoundFileStreamReference.cs
- XmlConverter.cs
- MiniConstructorInfo.cs
- KeyMatchBuilder.cs
- DisplayInformation.cs
- XmlSchemaAny.cs
- ExpressionPrefixAttribute.cs
- CompositeDesignerAccessibleObject.cs
- JsonUriDataContract.cs
- WindowsMenu.cs
- GatewayDefinition.cs
- ProviderSettingsCollection.cs
- DataPagerField.cs
- Graphics.cs
- SessionPageStatePersister.cs