Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/iNavFlight/inav-configurator.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Hudson <jh+w1retap@daria.co.uk>2015-11-11 19:52:02 +0300
committerJonathan Hudson <jh+w1retap@daria.co.uk>2015-11-11 19:52:02 +0300
commit65f2be91016929e38999c6aac80bbf37f9d51290 (patch)
treea3dd4fd8b7e417581270b6b80297276f6863be92 /support
parent13d255fe9b28a587617d91294e0a4c86d2f81db4 (diff)
update motor diagrams to new colour theme
Diffstat (limited to 'support')
-rwxr-xr-xsupport/svg_model_motors.rb13
1 files changed, 9 insertions, 4 deletions
diff --git a/support/svg_model_motors.rb b/support/svg_model_motors.rb
index e2aea439..e0ebd083 100755
--- a/support/svg_model_motors.rb
+++ b/support/svg_model_motors.rb
@@ -45,6 +45,11 @@ class Model
SW=2
NW=3
+ # Colours
+ BODY_GREY='#bababa'
+ CIRCLE_GREEN = '#54ad1d'
+ ARROW_RED = '#fa0700'
+
# We use StringIO in order to be able to add a (non-)copyright statement
def initialize filename
@lw = RADIUS
@@ -56,7 +61,7 @@ class Model
end
# Draw an arbitrary path, x,y pairs terminated by !
- def draw_path path,fill=:silver,round=false
+ def draw_path path,fill=BODY_GREY,round=false
@cr.set_line_cap(Cairo::LINE_JOIN_ROUND) if round
@cr.set_source_color(fill)
@cr.set_line_width(@lw)
@@ -78,7 +83,7 @@ class Model
# Draw body parts, really just a rounded line
def draw_body x1,y1,x2,y2
- @cr.set_source_color(:silver)
+ @cr.set_source_color(BODY_GRAY)
@cr.set_line_width(@lw)
@cr.set_line_join(Cairo::LINE_JOIN_ROUND)
@cr.move_to(x1,y1)
@@ -100,7 +105,7 @@ class Model
# Draw direction arrow at Y offset
def draw_dirn y=80
@cr.set_line_join(Cairo::LINE_JOIN_BEVEL)
- @cr.set_source_color(:red)
+ @cr.set_source_color(ARROW_RED)
@cr.move_to(100,y)
@cr.set_line_width(12)
@cr.rel_line_to(0, 40)
@@ -117,7 +122,7 @@ class Model
# Draw a circle, perhaps with directional arrows
# lyoffset, lxoffset change label position
def draw_circle x,y,label,dirn=CCW,loc=NE,fill=nil,colour=nil,lyoffset=0,lxoffset=0
- col = (colour||Cairo::Color::ROYAL_BLUE)
+ col = (colour||'#54AD1D')
@cr.set_font_size(@radius)
@cr.set_line_join(Cairo::LINE_JOIN_MITER)
@cr.set_line_width(3)