Version

DrawUtility Class Members

The following tables list the members exposed by DrawUtility.

Public Constructors
 NameDescription
Public ConstructorDrawUtility Constructor  
Public Properties
 NameDescription
Public Propertystatic (Shared in Visual Basic)DisableInvalidRectRenderingOptimizationsGets or sets the value that indicates whether the rendering optimizations introduced in 7.3 for rendering to invalid rects should be disabled.  
Public Propertystatic (Shared in Visual Basic)DpiAwareScalingFactorGets the DpiAware scaling factor.  
Public Propertystatic (Shared in Visual Basic)ScalingFactorGets the DPI scaling factor  
Public Propertystatic (Shared in Visual Basic)ScreenDpiGets the screen dpi.  
Public Propertystatic (Shared in Visual Basic)UseGDIPlusTextRenderingGets/sets whether GDI+ should be used to render/ measure text.  
Public Methods
 NameDescription
Public Methodstatic (Shared in Visual Basic)AdjustBorderStyleOverloaded. Returns the border style based on the state (i.e. IsPrint, FlatMode, etc.) of the element.  
Public Methodstatic (Shared in Visual Basic)AdjustedButtonStyleOverloaded. Returns the button style based on the state (i.e. IsPrint, FlatMode, etc. ) of the element.  
Public Methodstatic (Shared in Visual Basic)AdjustHAlignOverloaded. Adjusts one rect relative to another horizontally.  
Public Methodstatic (Shared in Visual Basic)AdjustVAlignOverloaded. Adjusts one rect relative to another horizontally.  
Public Methodstatic (Shared in Visual Basic)BeginGraphicsCachingCalled at the start of operations that may require multiple calls to GetCachedGraphics to do metrics calculations.  
Public Methodstatic (Shared in Visual Basic)CalculateBorderWidthsOverloaded. Static method that calculates the widths of all 4 borders.  
Public Methodstatic (Shared in Visual Basic)CalculateButtonBorderWidthsOverloaded. Static method that calculates the widths of all 4 button borders  
Public Methodstatic (Shared in Visual Basic)CalculateSmallestButtonClientRectCalculates the area inside the button borders that is available regardless of the button state.  
Public Methodstatic (Shared in Visual Basic)CombineImageWithAlphaMapCombines two images to provide alpha-blending.  
Public Methodstatic (Shared in Visual Basic)CombineRgbColorsOverloaded. Blends the specified colors into a single color, using the specified percentages for each color.  
Public Methodstatic (Shared in Visual Basic)ConvertToGrayScaleConverts the specified Color to a grayscale color.  
Public Methodstatic (Shared in Visual Basic)CopyImageOverloaded. Creates a copy of the specified image using the specified Image attributes  
Public Methodstatic (Shared in Visual Basic)CreateBorderRegionOverloaded. Creates a System.Drawing.Region which defines the region within the specified border style.  
Public Methodstatic (Shared in Visual Basic)CreateDisabledImageOverloaded. Creates a disabled copy of the specified image  
Public Methodstatic (Shared in Visual Basic)CreateReferenceGraphicsObsolete. Use GetCachedGraphics and ReleaseCachedGraphics instead.  
Public Methodstatic (Shared in Visual Basic)CreateRoundedRegionOverloaded. Returns a System.Drawing.Region from the specified rect, with rounded corners with the specified radius.  
Public Methodstatic (Shared in Visual Basic)CreateScaledImageCreates a new image using a scaled portion of the original image.  
Public Methodstatic (Shared in Visual Basic)CreateShadowImageCreates an image 2 pixels wider and taller than the original that contains the original image above a shadowed copy of the image  
Public Methodstatic (Shared in Visual Basic)DarkCreates a new dark color from the specified base color.  
Public Methodstatic (Shared in Visual Basic)DarkDarkCreates a new dark color from the specified base color.  
Public Methodstatic (Shared in Visual Basic)DrawBackColorOverloaded. Helper method that draws the backcolor based on the setting in the appearance data structure.  
Public Methodstatic (Shared in Visual Basic)DrawBordersRenders the specified borderstyle into the graphics object.  
Public Methodstatic (Shared in Visual Basic)DrawBorderShadowDraws a shadow around an image rectangle  
Public Methodstatic (Shared in Visual Basic)DrawGlassOverlayDraws a glass overlay over the specified rectangle.  
Public Methodstatic (Shared in Visual Basic)DrawGlowGradientDraws a rounded glow gradient at the specified orientation of the System.Drawing.Rectangle provided.  
Public Methodstatic (Shared in Visual Basic)DrawImageOverloaded. Renders the ImageBackground for the AppearanceData in the specified graphics object.  
Public Methodstatic (Shared in Visual Basic)DrawImageBackgroundOverloaded. Renders the ImageBackground for the AppearanceData in the specified graphics object.  
Public Methodstatic (Shared in Visual Basic)DrawOffice2007RibbonButtonBordersOverloaded. Draws a border in the style of an an Office2007 Ribbon Button.  
Public Methodstatic (Shared in Visual Basic)DrawOffice2010ButtonBordersOverloaded. Draws button border in Office2010 style.  
Public Methodstatic (Shared in Visual Basic)DrawOffice2013ButtonBordersOverloaded. Draws button border in Office2013 style.  
Public Methodstatic (Shared in Visual Basic)DrawRounded1BorderDraws a rounded border with only a single pixel missing on the outside.  
Public Methodstatic (Shared in Visual Basic)DrawScenicRibbonButtonBordersOverloaded. Draws a border in the style of an an Scenic Ribbon Button.  
Public Methodstatic (Shared in Visual Basic)DrawStringOverloaded. Draws a string with the specified parameters.  
Public Methodstatic (Shared in Visual Basic)DrawWindowsVistaButtonOverlayDraws an alphablended layer over the button to simulate the Windows Vista Aero theme for buttons.  
Public Methodstatic (Shared in Visual Basic)DrawWindowsVistaToolbarButtonBordersOverloaded. Draws a border in the style of a Windows Vista Toolbar Button Button.  
Public Methodstatic (Shared in Visual Basic)DrawWindowsVistaToolbarButtonOverlayDraws an alphablended layer of color over the button to highlight it when hot tracked or pressed.  
Public Methodstatic (Shared in Visual Basic)EndGraphicsCachingCalled at the end of operations that may require multiple calls to GetCachedGraphics to do metrics calculations.  
Public Methodstatic (Shared in Visual Basic)GetAlphaBlendColorReturns a color with the alpha channel set based on the specified alpha level. If the color already has its alpha channel set, it will be adjusted based on the specified alpha level. e.g. If the color's A = 100 and the alphaLevel is 123, the new color's A will be approximately 50.  
Public Methodstatic (Shared in Visual Basic)GetAlphaLevelReturns the alpha level to use when rendering based upon the current alpha blend mode, alpha setting and alpha level.  
Public Methodstatic (Shared in Visual Basic)GetCachedGraphicsCalled to get a graphics object suitable for doing metrics calculations only.  
Public Methodstatic (Shared in Visual Basic)GetGdiDrawStringFlagsOverloaded. Returns the GdiDrawStringFlags based on the specified parameters. Note that when working with embeddable editor, the overload that takes in the embeddable owner and owner context should be used.  
Public Methodstatic (Shared in Visual Basic)GetRoundedRectPathOverloaded. Creates a System.Drawing.Drawing2D.GraphicsPath for a rectangle with rounded corners  
Public Methodstatic (Shared in Visual Basic)IconToBitmapConverts the specified System.Drawing.Icon to a System.Drawing.Bitmap, preserving transparency.  
Public Methodstatic (Shared in Visual Basic)InchesToPixelsConverts inches to pixels based on the screen DPI.  
Public Methodstatic (Shared in Visual Basic)IsHotTrackingButtonStyleReturns true if the specified button style includes hot tracking by default.  
Public Methodstatic (Shared in Visual Basic)IsRoundedBorderStyleReturns a boolean indicating whether the specified border style is rounded.  
Public Methodstatic (Shared in Visual Basic)LightCreates a new light color from the specified base color.  
Public Methodstatic (Shared in Visual Basic)LightLightCreates a new light color from the specified base color.  
Public Methodstatic (Shared in Visual Basic)MeasureStringOverloaded. Measures a string with the specified parameters.  
Public Methodstatic (Shared in Visual Basic)PixelsToInchesConverts pixels to inches based on the screen DPI.  
Public Methodstatic (Shared in Visual Basic)PixelsToPointsConverts pixels to points based on the screen DPI.  
Public Methodstatic (Shared in Visual Basic)PointsToPixelsConverts points to pixels based on the screen DPI.  
Public Methodstatic (Shared in Visual Basic)ReleaseCachedGraphicsCalled to release a graphics object that was returned from a prior call to GetCachedGraphics.  
Public Methodstatic (Shared in Visual Basic)ReplaceColorReplaces one color in an image with a different color.  
Public Methodstatic (Shared in Visual Basic)ScrollControlWill call ther native windows ScvrollWindowEx api if the caller has securoty permissions to call unmanaged code. If not this method will just invalidate the control.  
Public Methodstatic (Shared in Visual Basic)VerticalTranslateAlignmentOverloaded. Converts the horizontal and vertical alignments to the appropriate corresponding alignments to support vertical elements.  
Public Methodstatic (Shared in Visual Basic)VerticalTranslateTextPlacementOverloaded. Converts the TextPlacement to the appropriate TextPlacement to support vertical elements.  
See Also