add color to text textures
authorDana Jansens <danakj@orodu.net>
Mon, 2 Jun 2003 01:36:04 +0000 (01:36 +0000)
committerDana Jansens <danakj@orodu.net>
Mon, 2 Jun 2003 01:36:04 +0000 (01:36 +0000)
render2/render.h
render2/texture.c
render2/texture.h

index 0a7654719000b06101d0f1e19896f632c77d530d..ff5ff293c2c4329a07e983f8228fb8a159d7911f 100644 (file)
@@ -219,6 +219,7 @@ void RrTextureSetText(struct RrSurface *sur,
                       int texnum,
                       struct RrFont *font,
                       enum RrLayout layout,
+                      struct RrColor *color,
                       const char *text);
 void RrTextureSetNone(struct RrSurface *sur,
                       int texnum);
index f766e3bcd3d7a713d39e2c2a731c9d457e726d5c..4d6aaa532c7c0b1807e918bb31ad039f75dd5919 100644 (file)
@@ -54,6 +54,7 @@ void RrTextureSetText(struct RrSurface *sur,
                       int texnum,
                       struct RrFont *font,
                       enum RrLayout layout,
+                      struct RrColor *color,
                       const char *text)
 {
     struct RrTexture *tex = RrSurfaceTexture(sur, texnum);
@@ -64,6 +65,7 @@ void RrTextureSetText(struct RrSurface *sur,
     tex->type = RR_TEXTURE_TEXT;
     tex->data.text.font = font;
     tex->data.text.layout = layout;
+    tex->data.text.color = *color;
 
     l = strlen(text) + 1;
     tex->data.text.string = malloc(l);
index 238805e1507ed13919999aba912550acd67b6a37..9e1e08bb3fcd935c3d7b32e7bdef7fe7fe6115b0 100644 (file)
@@ -13,6 +13,7 @@ enum RrTextureType {
 struct RrTextureText {
     struct RrFont *font;
     enum RrLayout layout;
+    struct RrColor color;
     char *string;
 };