From 3ad2c65d1580f0b28033b733a728347e0f81e5f7 Mon Sep 17 00:00:00 2001 From: francesco-ST Date: Fri, 6 Aug 2010 10:52:32 +0200 Subject: completed text properties implementation --- agg-plot/agg-parse-trans.cpp | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'agg-plot/agg-parse-trans.cpp') diff --git a/agg-plot/agg-parse-trans.cpp b/agg-plot/agg-parse-trans.cpp index 4ec14748..368405fd 100644 --- a/agg-plot/agg-parse-trans.cpp +++ b/agg-plot/agg-parse-trans.cpp @@ -123,14 +123,11 @@ build_dash (lua_State *L, int specindex, typename context::base_type *obj) lua_pop (L, 1); lua_rawgeti (L, specindex, j+1); - if (lua_isnumber (L, -1)) - { - double b = lua_tonumber (L, -1); - dash.add_dash(a, b); - lua_pop (L,1); - } - else - break; + + double b = (lua_isnumber (L, -1) ? lua_tonumber (L, -1) : a); + + dash.add_dash(a, b); + lua_pop (L,1); } else break; -- cgit v1.2.3

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