From 7ede5e547851f61dd600c12532a09038d811c418 Mon Sep 17 00:00:00 2001 From: Comment Date: Wed, 16 Oct 2013 22:59:25 -0700 Subject: fix shape colour attribute for json loader --- rotord/src/nodes_drawing.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'rotord/src/nodes_drawing.h') diff --git a/rotord/src/nodes_drawing.h b/rotord/src/nodes_drawing.h index 6e29130..4001514 100644 --- a/rotord/src/nodes_drawing.h +++ b/rotord/src/nodes_drawing.h @@ -56,11 +56,11 @@ namespace Rotor { }; Text(map &settings):Text() { base_settings(settings); - colour=Colour(attributes["colour"]->value); }; ~Text(){}; Text* clone(map &_settings) { return new Text(_settings);}; void vector_output(cairo_t * cr,const Frame_spec &frame){ + colour=Colour(attributes["colour"]->value); string text; if (parameters["number"]->value>-99999998.0f){ text=toString(parameters["number"]->value,4); @@ -96,11 +96,11 @@ namespace Rotor { }; Shape(map &settings):Shape() { base_settings(settings); - colour=Colour(attributes["colour"]->value); }; ~Shape(){}; Shape* clone(map &_settings) { return new Shape(_settings);}; void vector_output(cairo_t * cr,const Frame_spec &frame){ + colour=Colour(attributes["colour"]->value); cairo_set_source_rgb(cr, colour.Rfloat(),colour.Gfloat(),colour.Bfloat()); cairo_save(cr); //not really even necessary? cairo_translate(cr, frame.w/2, frame.h/2); @@ -173,12 +173,12 @@ namespace Rotor { } Waves(map &settings):Waves() { base_settings(settings); - stroke=Colour(attributes["stroke"]->value); - fill=Colour(attributes["fill"]->value); }; ~Waves(){}; Waves* clone(map &_settings) { return new Waves(_settings);}; void vector_audio_output(cairo_t * cr,const Frame_spec &frame){ + stroke=Colour(attributes["stroke"]->value); + fill=Colour(attributes["fill"]->value); int channel=attributes["channel"]->intVal-1; if (attributes["mode"]->value=="fill"||attributes["mode"]->value=="both") { cairo_set_source_rgba(cr, fill.Rfloat(),fill.Gfloat(),fill.Bfloat(),parameters["alpha"]->value); -- cgit v1.2.3