added "extend" transform for pre3d rendering - gsl-shell.git - gsl-shell

index : gsl-shell.git
gsl-shell
summary refs log tree commit diff
path: root/agg-plot/lua-draw.cpp
diff options
context:
space:
mode:
authorfrancesco-ST <francesco.abbate@st.com>2010年07月15日 13:57:44 +0200
committerfrancesco-ST <francesco.abbate@st.com>2010年07月15日 13:57:44 +0200
commit426d707efc9845a1230a8f8fa984338719a151a7 (patch)
tree48a31d20eca434223347dd10bb9fba58df059bc0 /agg-plot/lua-draw.cpp
parentf93eaab58d78528b56710dbdbcf0b0232d1f46ad (diff)
downloadgsl-shell-426d707efc9845a1230a8f8fa984338719a151a7.tar.gz
added "extend" transform for pre3d rendering
The "extend" transform corresponds to agg::conv_contour and it allows to extend/shrink a polygon. Removed the on_draw callback.
Diffstat (limited to 'agg-plot/lua-draw.cpp')
-rw-r--r--agg-plot/lua-draw.cpp 54
1 files changed, 1 insertions, 53 deletions
diff --git a/agg-plot/lua-draw.cpp b/agg-plot/lua-draw.cpp
index a26c49de..48e9580f 100644
--- a/agg-plot/lua-draw.cpp
+++ b/agg-plot/lua-draw.cpp
@@ -48,11 +48,6 @@ static int agg_rgba_free (lua_State *L);
static int agg_rgba_add (lua_State *L);
static int agg_rgba_mul (lua_State *L);
static int agg_rgba_set_alpha (lua_State *L);
-#if 0
-static int agg_rgba_invert (lua_State *L);
-static int agg_rgba_dup (lua_State *L);
-static int agg_rgba_set (lua_State *L);
-#endif
static void path_cmd (my::path *p, int cmd, struct cmd_call_stack *stack);
@@ -85,11 +80,6 @@ static const struct luaL_Reg rgba_methods[] = {
{"__add", agg_rgba_add },
{"__mul", agg_rgba_mul },
{"alpha", agg_rgba_set_alpha },
-#if 0
- {"set", agg_rgba_set },
- {"invert", agg_rgba_invert },
- {"dup", agg_rgba_dup },
-#endif
{NULL, NULL}
};
@@ -256,7 +246,7 @@ agg_text_new (lua_State *L)
{
double size = luaL_optnumber (L, 1, 10.0);
double width = luaL_optnumber (L, 2, 1.0);
- my::text *txt = new(L, GS_DRAW_TEXT) my::text(size, width);
+ new(L, GS_DRAW_TEXT) my::text(size, width);
return 1;
}
@@ -345,48 +335,6 @@ agg_rgba_set_alpha (lua_State *L)
return 0;
}
-#if 0
-int
-agg_rgba_set (lua_State *L)
-{
- agg::rgba8 *c = (agg::rgba8 *) gs_check_userdata (L, 1, GS_RGBA_COLOR);
- double r, g, b, a;
-
- r = luaL_checknumber (L, 2);
- g = luaL_checknumber (L, 3);
- b = luaL_checknumber (L, 4);
- if (lua_gettop (L) > 4)
- a = luaL_checknumber (L, 5);
- else
- a = 1.0;
-
- c->r = r;
- c->g = g;
- c->b = b;
- c->a = a;
-
- return 0;
-}
-
-int
-agg_rgba_invert (lua_State *L)
-{
- agg::rgba8 *c = (agg::rgba8 *) gs_check_userdata (L, 1, GS_RGBA_COLOR);
- c->r = 1 - c->r;
- c->g = 1 - c->g;
- c->b = 1 - c->b;
- return 0;
-}
-
-int
-agg_rgba_dup (lua_State *L)
-{
- agg::rgba8 *src = (agg::rgba8 *) gs_check_userdata (L, 1, GS_RGBA_COLOR);
- new(L, GS_RGBA_COLOR) agg::rgba8(*src);
- return 1;
-}
-#endif
-
int
agg_rgba_add (lua_State *L)
{
generated by cgit v1.2.3 (git 2.39.1) at 2025年09月14日 19:11:22 +0000

AltStyle によって変換されたページ (->オリジナル) /