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
- externdll.cs
- EditorZone.cs
- TableLayoutRowStyleCollection.cs
- ImpersonateTokenRef.cs
- SourceFilter.cs
- Rect.cs
- PointValueSerializer.cs
- GPPOINT.cs
- SliderAutomationPeer.cs
- InfocardExtendedInformationCollection.cs
- ScrollProperties.cs
- MimeWriter.cs
- RSAProtectedConfigurationProvider.cs
- AppSettingsExpressionBuilder.cs
- XsltContext.cs
- SingleBodyParameterMessageFormatter.cs
- TreeIterators.cs
- PermissionListSet.cs
- SignedPkcs7.cs
- TraceHandlerErrorFormatter.cs
- HotSpot.cs
- HttpTransportElement.cs
- SizeConverter.cs
- DependencyPropertyKey.cs
- DynamicRouteExpression.cs
- TagMapCollection.cs
- BinaryObjectReader.cs
- DataControlExtensions.cs
- DBAsyncResult.cs
- TreeViewBindingsEditorForm.cs
- ListDictionaryInternal.cs
- ColorAnimationBase.cs
- UriTemplateCompoundPathSegment.cs
- MutexSecurity.cs
- SignatureDescription.cs
- ModulesEntry.cs
- CodeRemoveEventStatement.cs
- BeginStoryboard.cs
- NamedPipeHostedTransportConfiguration.cs
- CryptoStream.cs
- ILGen.cs
- Attributes.cs
- SmiMetaDataProperty.cs
- ScrollContentPresenter.cs
- SerialPinChanges.cs
- XPathMultyIterator.cs
- UpdateCompiler.cs
- InstanceData.cs
- SystemNetHelpers.cs
- ErrorHandler.cs
- ApplicationException.cs
- HostedAspNetEnvironment.cs
- HttpCacheParams.cs
- HandleCollector.cs
- DrawingDrawingContext.cs
- StickyNoteHelper.cs
- AmbientLight.cs
- PersistenceException.cs
- CultureSpecificStringDictionary.cs
- StyleTypedPropertyAttribute.cs
- JsonClassDataContract.cs
- ServiceContractListItemList.cs
- PromptEventArgs.cs
- XmlSchemaElement.cs
- RecordBuilder.cs
- MetabaseServerConfig.cs
- DeviceContexts.cs
- ObjectPersistData.cs
- ContentType.cs
- MenuEventArgs.cs
- TableLayoutColumnStyleCollection.cs
- DependencyObjectValidator.cs
- ClaimTypeElementCollection.cs
- SystemBrushes.cs
- RoutedEvent.cs
- DocumentPage.cs
- ProtocolsConfigurationHandler.cs
- ScrollableControl.cs
- StorageMappingItemCollection.cs
- NonParentingControl.cs
- TableItemStyle.cs
- SynchronizedInputAdaptor.cs
- CatalogZone.cs
- OleStrCAMarshaler.cs
- TypeSystem.cs
- SqlMethods.cs
- AuthorizationSection.cs
- TransactedReceiveData.cs
- EntityDataSourceDesigner.cs
- UnsafeNativeMethods.cs
- ClientScriptManagerWrapper.cs
- PauseStoryboard.cs
- VectorAnimation.cs
- ContractSearchPattern.cs
- ApplicationGesture.cs
- CompareInfo.cs
- ContentDesigner.cs
- EntityDataReader.cs
- Trace.cs
- DataServiceResponse.cs