Beispiel #1
0
        public void DrawImage(Image source, ImagePosition position)
        {
            int errorCode = Image.DrawImageNative(this.handle, source.handle, ref position);

            if (errorCode != 0)
            {
                Error.ThrowNativeException(errorCode);
            }
        }
Beispiel #2
0
 private static extern int DrawTextNative(int handle, string text, int offset, int len, ref ImageColor color, int font_handle, ref ImagePosition position);
Beispiel #3
0
 private static extern int DrawImageNative(int handle, int source_handle, ref ImagePosition position);
Beispiel #4
0
        public void DrawText(string text, int offset, int len, ImageColor color, Font font, ImagePosition position)
        {
            int errorCode = Image.DrawTextNative(this.handle, text, offset, len, ref color, font.Handle, ref position);

            if (errorCode != 0)
            {
                Error.ThrowNativeException(errorCode);
            }
        }
Beispiel #5
0
 /// <summary>Renders text within the image (all of the character string)</summary>
 /// <param name="text">Character string</param>
 /// <param name="color">Font color</param>
 /// <param name="font">Font</param>
 /// <param name="position">Coordinate within the image (upper left of the text)</param>
 /// <remarks>DrawText is the action of rendering text on a transparent image. The RGB value is overwritten with the color provided by the color argument, and the Alpha value is blended.</remarks>
 /// <remarks>When DrawText is called for an opaque image, the expected effect cannot be obtained.</remarks>
 public void DrawText(string text, ImageColor color, Font font, ImagePosition position)
 {
     this.DrawText(text, 0, text.Length, color, font, position);
 }