From f29c4413edf63edb97437670008bbc778be7429d Mon Sep 17 00:00:00 2001 From: Stephen Adams Date: Tue, 20 Aug 1996 03:48:13 +0000 Subject: [PATCH] Added X-GRAPHICS-DRAW-IMAGE-STRING. --- v7/src/microcode/x11graph.c | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/v7/src/microcode/x11graph.c b/v7/src/microcode/x11graph.c index 9d2f77f00..0b9e86f0b 100644 --- a/v7/src/microcode/x11graph.c +++ b/v7/src/microcode/x11graph.c @@ -1,6 +1,6 @@ /* -*-C-*- -$Id: x11graph.c,v 1.36 1996/07/12 20:12:15 adams Exp $ +$Id: x11graph.c,v 1.37 1996/08/20 03:48:13 adams Exp $ Copyright (c) 1989-95 Massachusetts Institute of Technology @@ -587,7 +587,8 @@ If FILL? is true, the arc is filled.") DEFINE_PRIMITIVE ("X-GRAPHICS-DRAW-STRING", Prim_x_graphics_draw_string, 4, 4, "(X-GRAPHICS-DRAW-STRING WINDOW X Y STRING)\n\ -Draw characters in the current font at the given coordinates.") +Draw characters in the current font at the given coordinates, with\n\ +transparent background.") { PRIMITIVE_HEADER (4); { @@ -606,6 +607,29 @@ Draw characters in the current font at the given coordinates.") PRIMITIVE_RETURN (UNSPECIFIC); } +DEFINE_PRIMITIVE ("X-GRAPHICS-DRAW-IMAGE-STRING", + Prim_x_graphics_draw_image_string, 4, 4, + "(X-GRAPHICS-DRAW-IMAGE-STRING WINDOW X Y STRING)\n\ +Draw characters in the current font at the given coordinates, with\n\ +solid background.") +{ + PRIMITIVE_HEADER (4); + { + struct xwindow * xw = (x_window_arg (1)); + unsigned int internal_border_width = (XW_INTERNAL_BORDER_WIDTH (xw)); + char * s = (STRING_ARG (4)); + XDrawImageString + ((XW_DISPLAY (xw)), + (XW_WINDOW (xw)), + (XW_NORMAL_GC (xw)), + (internal_border_width + (arg_x_coordinate (2, xw))), + (internal_border_width + (arg_y_coordinate (3, xw))), + s, + (STRING_LENGTH (ARG_REF (4)))); + } + PRIMITIVE_RETURN (UNSPECIFIC); +} + DEFINE_PRIMITIVE ("X-GRAPHICS-SET-FUNCTION", Prim_x_graphics_set_function, 2, 2, 0) { PRIMITIVE_HEADER (2); -- 2.25.1