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
- ApplicationServiceHelper.cs
- ScopedKnownTypes.cs
- DockAndAnchorLayout.cs
- MetadataPropertyCollection.cs
- FixedHyperLink.cs
- DbMetaDataCollectionNames.cs
- ListSourceHelper.cs
- Vector3DKeyFrameCollection.cs
- CollectionEditVerbManager.cs
- ToolStripSystemRenderer.cs
- ConsoleCancelEventArgs.cs
- ArrangedElementCollection.cs
- UdpDiscoveryEndpointElement.cs
- FrameworkElement.cs
- CollectionViewGroup.cs
- PresentationSource.cs
- BaseResourcesBuildProvider.cs
- MetadataItem.cs
- ValidatorUtils.cs
- DrawingContextWalker.cs
- DefaultTextStoreTextComposition.cs
- Invariant.cs
- AngleUtil.cs
- SelectionPattern.cs
- SqlFlattener.cs
- Rect3DConverter.cs
- StreamWriter.cs
- _NegoStream.cs
- NativeRecognizer.cs
- PnrpPeerResolver.cs
- MenuItem.cs
- TopClause.cs
- AnchoredBlock.cs
- PolicyLevel.cs
- SparseMemoryStream.cs
- TwoPhaseCommit.cs
- VBIdentifierDesigner.xaml.cs
- ProxyHelper.cs
- MemberExpressionHelper.cs
- ConfigurationStrings.cs
- UnknownBitmapDecoder.cs
- MethodBody.cs
- XPathAncestorIterator.cs
- QilPatternVisitor.cs
- Mouse.cs
- ResourceAssociationSetEnd.cs
- ListBoxItemAutomationPeer.cs
- QilGeneratorEnv.cs
- TypeListConverter.cs
- GridViewPageEventArgs.cs
- DetailsViewRowCollection.cs
- PageRanges.cs
- MeasurementDCInfo.cs
- HttpRawResponse.cs
- ControlPaint.cs
- KerberosTicketHashIdentifierClause.cs
- HostProtectionException.cs
- PersonalizationProvider.cs
- TemplateInstanceAttribute.cs
- Token.cs
- ChannelManager.cs
- TreeNodeConverter.cs
- EventMappingSettingsCollection.cs
- BooleanSwitch.cs
- ScrollViewer.cs
- ButtonField.cs
- SQLMoneyStorage.cs
- FunctionOverloadResolver.cs
- NeutralResourcesLanguageAttribute.cs
- LongTypeConverter.cs
- Aggregates.cs
- ToolStripItemImageRenderEventArgs.cs
- ToolBarOverflowPanel.cs
- TreeNodeConverter.cs
- ThaiBuddhistCalendar.cs
- CodeIdentifiers.cs
- EventWaitHandle.cs
- DiscoveryViaBehavior.cs
- ServiceModelSecurityTokenTypes.cs
- TableAdapterManagerNameHandler.cs
- AdRotator.cs
- ConvertEvent.cs
- NavigationCommands.cs
- LocalizabilityAttribute.cs
- AnonymousIdentificationSection.cs
- OneOfScalarConst.cs
- BufferModesCollection.cs
- TypeConverterMarkupExtension.cs
- SynchronizedInputProviderWrapper.cs
- ReferencedAssembly.cs
- ToolZone.cs
- SchemaName.cs
- Pointer.cs
- OlePropertyStructs.cs
- KeyManager.cs
- TargetConverter.cs
- FieldCollectionEditor.cs
- ClassValidator.cs
- LocalizedNameDescriptionPair.cs
- BulletedList.cs