GetMaximumFontSize(graphics, fontFamily, text, style, allowWordWrapping, maxWidth, maxHeight) MakeSemitransparentImage(width, height, initGraphics, drawOpaqueLayer, drawTransparencyLayer, transparencyFromChannel, invertTransparency)
Legend Class Struct Enum Interface Delegate | Constructor Method Property Event Field |
| Static method: Bitmap MakeSemitransparentImage(int, int, Action<Graphics>, Action<Graphics>, Action<Graphics>, int, bool)Declarationpublic static Bitmap MakeSemitransparentImage(
int width,
int height,
Action<Graphics> initGraphics,
Action<Graphics> drawOpaqueLayer,
Action<Graphics> drawTransparencyLayer,
int transparencyFromChannel = 0,
bool invertTransparency = false
) Summary
Generates an image by taking the color components from one image and the transparency (alpha) layer from
another. Parametersint | width |
The width of the image to generate. | int | height |
The height of the image to generate. | Action<Graphics> | initGraphics |
Optional delegate to invoke on each of the two images. | Action<Graphics> | drawOpaqueLayer |
Code to draw the color layers. | Action<Graphics> | drawTransparencyLayer |
Code to draw the transparency (alpha) layer. | int | transparencyFromChannel |
Which color channel from the transparency image to use for the final transparency: 0=alpha; 1=red; 2=green;
3=blue. | bool | invertTransparency | true to invert the channel identified by transparencyFromChannel before using it as
transparency information. |
Returns
The new bitmap generated. |