Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Core / CSharp / System / Windows / Media / Effects / BlurEffect.cs / 1305600 / BlurEffect.cs
//------------------------------------------------------------------------------ // Microsoft Avalon // Copyright (c) Microsoft Corporation, 2005 // // File: BlurImageEffect.cs //----------------------------------------------------------------------------- using System; using System.Diagnostics; using System.Windows; using System.Windows.Media; namespace System.Windows.Media.Effects { ////// BlurEffect /// public partial class BlurEffect { #region Constructors ////// Constructor /// public BlurEffect() { } #endregion ////// Takes in content bounds, and returns the bounds of the rendered /// output of that content after the Effect is applied. /// internal override Rect GetRenderBounds(Rect contentBounds) { Point topLeft = new Point(); Point bottomRight = new Point(); double radius = Radius; topLeft.X = contentBounds.TopLeft.X - radius; topLeft.Y = contentBounds.TopLeft.Y - radius; bottomRight.X = contentBounds.BottomRight.X + radius; bottomRight.Y = contentBounds.BottomRight.Y + radius; return new Rect(topLeft, bottomRight); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. //------------------------------------------------------------------------------ // Microsoft Avalon // Copyright (c) Microsoft Corporation, 2005 // // File: BlurImageEffect.cs //----------------------------------------------------------------------------- using System; using System.Diagnostics; using System.Windows; using System.Windows.Media; namespace System.Windows.Media.Effects { ////// BlurEffect /// public partial class BlurEffect { #region Constructors ////// Constructor /// public BlurEffect() { } #endregion ////// Takes in content bounds, and returns the bounds of the rendered /// output of that content after the Effect is applied. /// internal override Rect GetRenderBounds(Rect contentBounds) { Point topLeft = new Point(); Point bottomRight = new Point(); double radius = Radius; topLeft.X = contentBounds.TopLeft.X - radius; topLeft.Y = contentBounds.TopLeft.Y - radius; bottomRight.X = contentBounds.BottomRight.X + radius; bottomRight.Y = contentBounds.BottomRight.Y + radius; return new Rect(topLeft, bottomRight); } } } // 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
- XmlNodeChangedEventArgs.cs
- PrintEvent.cs
- HttpRawResponse.cs
- Color.cs
- DataGridViewCheckBoxCell.cs
- CultureSpecificStringDictionary.cs
- DataRelationCollection.cs
- RegexMatchCollection.cs
- SchemaInfo.cs
- MetadataItem.cs
- TemplateInstanceAttribute.cs
- ConfigXmlDocument.cs
- EndpointPerformanceCounters.cs
- RelationshipConverter.cs
- BaseParaClient.cs
- ObjectDataSourceStatusEventArgs.cs
- Object.cs
- ColumnTypeConverter.cs
- ExtensionDataObject.cs
- HttpRequest.cs
- DbBuffer.cs
- SmtpCommands.cs
- TypeDescriptionProviderAttribute.cs
- UrlSyndicationContent.cs
- pingexception.cs
- FrameworkContentElement.cs
- WarningException.cs
- ImageMap.cs
- RowsCopiedEventArgs.cs
- LostFocusEventManager.cs
- StrongNameIdentityPermission.cs
- GradientStop.cs
- EngineSite.cs
- ColumnResult.cs
- SqlClientPermission.cs
- SystemUdpStatistics.cs
- NamedObjectList.cs
- CombinedGeometry.cs
- Inline.cs
- SessionState.cs
- SecurityKeyIdentifierClause.cs
- ResXResourceReader.cs
- Token.cs
- XmlCharType.cs
- MaterializeFromAtom.cs
- ServicePointManagerElement.cs
- BitConverter.cs
- ListViewCommandEventArgs.cs
- XmlStreamNodeWriter.cs
- FontStretch.cs
- DrawingGroup.cs
- RolePrincipal.cs
- PerformanceCountersBase.cs
- RectangleF.cs
- ProfileBuildProvider.cs
- DataGridGeneralPage.cs
- UserControlBuildProvider.cs
- RegexWorker.cs
- odbcmetadatacollectionnames.cs
- XmlBufferReader.cs
- ToolStripContentPanel.cs
- WebControlAdapter.cs
- ResourceDescriptionAttribute.cs
- DiffuseMaterial.cs
- SQlBooleanStorage.cs
- mediaeventshelper.cs
- ConfigurationStrings.cs
- DataFieldConverter.cs
- ToolStripItemEventArgs.cs
- HybridDictionary.cs
- PageBreakRecord.cs
- DesignerMetadata.cs
- XmlName.cs
- FileSystemEventArgs.cs
- StyleCollection.cs
- DeclarativeCatalogPart.cs
- SiteMapSection.cs
- HttpInputStream.cs
- UIElementCollection.cs
- SqlHelper.cs
- NonVisualControlAttribute.cs
- Missing.cs
- Base64WriteStateInfo.cs
- x509utils.cs
- UserPrincipalNameElement.cs
- VirtualDirectoryMapping.cs
- ObjectDataSourceEventArgs.cs
- PointCollectionValueSerializer.cs
- ImagingCache.cs
- TextParagraphView.cs
- SecurityPermission.cs
- ReflectionTypeLoadException.cs
- GraphicsState.cs
- UnionCqlBlock.cs
- PasswordBox.cs
- NativeMethods.cs
- JsonXmlDataContract.cs
- ConsumerConnectionPointCollection.cs
- cache.cs
- CustomValidator.cs