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
- OperationExecutionFault.cs
- FixedSOMTable.cs
- BaseDataList.cs
- GlyphCollection.cs
- DeferredElementTreeState.cs
- MachineKeyConverter.cs
- DependencySource.cs
- EntryWrittenEventArgs.cs
- RuntimeArgumentHandle.cs
- DataRow.cs
- ExpressionBuilder.cs
- TaiwanCalendar.cs
- FlowDocumentPage.cs
- EdgeProfileValidation.cs
- NonVisualControlAttribute.cs
- Span.cs
- PhysicalFontFamily.cs
- MetroSerializationManager.cs
- ClientTarget.cs
- DetailsViewPageEventArgs.cs
- PathTooLongException.cs
- TextBlockAutomationPeer.cs
- SessionStateModule.cs
- RuntimeConfigurationRecord.cs
- JsonObjectDataContract.cs
- SamlAudienceRestrictionCondition.cs
- ImmutableCollection.cs
- ZipIOBlockManager.cs
- X509LogoTypeExtension.cs
- SamlAssertionDirectKeyIdentifierClause.cs
- LockedHandleGlyph.cs
- TypeHelpers.cs
- DiscriminatorMap.cs
- JsonWriter.cs
- LOSFormatter.cs
- ProviderConnectionPointCollection.cs
- ContainerParaClient.cs
- ContractSearchPattern.cs
- ResourceManagerWrapper.cs
- XmlIlGenerator.cs
- PropertyToken.cs
- EventTask.cs
- DBConcurrencyException.cs
- SafeReversePInvokeHandle.cs
- Script.cs
- MediaEntryAttribute.cs
- TimeSpanMinutesConverter.cs
- IdentityManager.cs
- VirtualDirectoryMapping.cs
- RtfToken.cs
- CurrentTimeZone.cs
- WebResponse.cs
- BrowserPolicyValidator.cs
- QuaternionRotation3D.cs
- NumericUpDownAcceleration.cs
- Message.cs
- FileLogRecordStream.cs
- PhysicalAddress.cs
- BaseContextMenu.cs
- FlowLayoutSettings.cs
- XPathNodeIterator.cs
- PeerNameRecord.cs
- ControlCommandSet.cs
- Quaternion.cs
- WsdlHelpGeneratorElement.cs
- OdbcFactory.cs
- altserialization.cs
- PointAnimationUsingKeyFrames.cs
- SequentialUshortCollection.cs
- DataList.cs
- DataGridColumnCollection.cs
- DropShadowEffect.cs
- ProcessModelInfo.cs
- RegexMatchCollection.cs
- Block.cs
- XmlSchemaObjectTable.cs
- ActivityValidationServices.cs
- MessageBox.cs
- Delegate.cs
- ContentPosition.cs
- SqlCrossApplyToCrossJoin.cs
- GroupItem.cs
- PropertyEmitterBase.cs
- DataTableCollection.cs
- RequestUriProcessor.cs
- CSharpCodeProvider.cs
- EntityAdapter.cs
- Visual3DCollection.cs
- DocumentViewerHelper.cs
- HuffCodec.cs
- SQLDecimalStorage.cs
- IntegerFacetDescriptionElement.cs
- UrlAuthFailureHandler.cs
- InfoCardTrace.cs
- DataGridRelationshipRow.cs
- MergePropertyDescriptor.cs
- GlyphRunDrawing.cs
- NotifyInputEventArgs.cs
- SecurityDescriptor.cs
- XmlCodeExporter.cs