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
- DocumentAutomationPeer.cs
- FixedSchema.cs
- path.cs
- AlternateView.cs
- IteratorFilter.cs
- CodeTypeMember.cs
- FixedSOMPageConstructor.cs
- ZoneLinkButton.cs
- SQLDateTime.cs
- BamlWriter.cs
- DockProviderWrapper.cs
- ToolboxItemCollection.cs
- GlyphShapingProperties.cs
- ByteRangeDownloader.cs
- DefaultTraceListener.cs
- HostingMessageProperty.cs
- MetaModel.cs
- Vector3DKeyFrameCollection.cs
- EmptyStringExpandableObjectConverter.cs
- HwndMouseInputProvider.cs
- ObfuscationAttribute.cs
- SynchronizationValidator.cs
- CompressStream.cs
- basemetadatamappingvisitor.cs
- SerialReceived.cs
- DataGridViewColumnConverter.cs
- MissingMethodException.cs
- ToolboxItem.cs
- SqlConnection.cs
- ShaderRenderModeValidation.cs
- WebPartVerbCollection.cs
- Line.cs
- DBCommandBuilder.cs
- ItemCheckedEvent.cs
- ElapsedEventArgs.cs
- AnnotationAdorner.cs
- X509SubjectKeyIdentifierClause.cs
- SQLGuidStorage.cs
- CustomErrorCollection.cs
- ZipPackage.cs
- RetrieveVirtualItemEventArgs.cs
- BooleanConverter.cs
- DbDataAdapter.cs
- XmlILAnnotation.cs
- PtsContext.cs
- Membership.cs
- PhysicalAddress.cs
- MetadataItem_Static.cs
- StatusBarPanel.cs
- ShimAsPublicXamlType.cs
- SecurityUtils.cs
- MimeObjectFactory.cs
- Compilation.cs
- MimeParameterWriter.cs
- MasterPage.cs
- XslNumber.cs
- HttpPostServerProtocol.cs
- EntityDataSourceWizardForm.cs
- RemoteWebConfigurationHostStream.cs
- XPathEmptyIterator.cs
- ItemsChangedEventArgs.cs
- XmlSchemaCollection.cs
- SecurityTokenProvider.cs
- DrawingGroupDrawingContext.cs
- RecordManager.cs
- XmlDocumentFragment.cs
- Padding.cs
- Partitioner.cs
- ActivityBindForm.cs
- HttpListenerElement.cs
- X509ThumbprintKeyIdentifierClause.cs
- SafeWaitHandle.cs
- DeferredTextReference.cs
- UserControl.cs
- X509Utils.cs
- GradientStop.cs
- AssemblyHelper.cs
- IdentityManager.cs
- MatrixStack.cs
- SqlDependencyListener.cs
- XmlSchemaAnyAttribute.cs
- ImageCodecInfoPrivate.cs
- HtmlInputImage.cs
- TextRangeAdaptor.cs
- AccessDataSourceView.cs
- DrawListViewItemEventArgs.cs
- BitmapEffect.cs
- RegexMatch.cs
- SoapElementAttribute.cs
- DataGridCell.cs
- ContentFilePart.cs
- IncrementalHitTester.cs
- ListViewItem.cs
- XmlChildEnumerator.cs
- ClickablePoint.cs
- MenuEventArgs.cs
- SizeChangedInfo.cs
- FontEmbeddingManager.cs
- DuplexChannelBinder.cs
- SHA1.cs