summaryrefslogtreecommitdiff
path: root/rotord
diff options
context:
space:
mode:
authorComment <tim@gray.(none)>2013-10-16 22:59:25 -0700
committerComment <tim@gray.(none)>2013-10-16 22:59:25 -0700
commit7ede5e547851f61dd600c12532a09038d811c418 (patch)
treec79cb6eee3e592556d618af453d0091324602b9b /rotord
parente2517ccd53a2219a7550bde0ba27f9df6e8d23bb (diff)
fix shape colour attribute for json loader
Diffstat (limited to 'rotord')
-rw-r--r--rotord/src/nodes_channels.h2
-rw-r--r--rotord/src/nodes_drawing.h8
2 files changed, 5 insertions, 5 deletions
diff --git a/rotord/src/nodes_channels.h b/rotord/src/nodes_channels.h
index 8e7d2a0..fe129ea 100644
--- a/rotord/src/nodes_channels.h
+++ b/rotord/src/nodes_channels.h
@@ -414,10 +414,10 @@ namespace Rotor {
title="Echo trails";
description="Draw trail frames additively that fade off over time";
UID="5b1ab684-2d0b-11e3-8fa2-970be8c360dd";
+ lastframe=-1;
};
Echo_trails(map<string,string> &settings):Echo_trails() {
base_settings(settings);
- lastframe=-1;
}
~Echo_trails(){
for (auto i:images) delete i.second;
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<string,string> &settings):Text() {
base_settings(settings);
- colour=Colour(attributes["colour"]->value);
};
~Text(){};
Text* clone(map<string,string> &_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<string,string> &settings):Shape() {
base_settings(settings);
- colour=Colour(attributes["colour"]->value);
};
~Shape(){};
Shape* clone(map<string,string> &_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<string,string> &settings):Waves() {
base_settings(settings);
- stroke=Colour(attributes["stroke"]->value);
- fill=Colour(attributes["fill"]->value);
};
~Waves(){};
Waves* clone(map<string,string> &_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);