Knob: Glade-enabled
[libprolooks.git] / prolooks / IKnobImageSource.vala
blobcbd1de73fbd78e104f8b1f82772aa3fa71a9c7f9
1 /*
2 Copyright 2009 by Hans Baier
3 License: LGPLv2+
4 */
6 using Gtk;
8 namespace Prolooks {
10 public interface IKnobImageSource : GLib.Object {
11 public int variants {
12 get {
13 return (int)KnobMode.ENDLESS + 1;
17 public int phases {
18 get {
19 return 65;
23 public abstract double get_knob_width ();
25 public abstract double get_knob_height ();
27 public abstract double get_line_width ();
29 public abstract double get_radius ();
31 public void paint_knobs (Cairo.Context cr, KnobMode knob_mode, double first_x, double first_y) {
32 var x = first_x;
33 var y = first_y;
34 for (var phase = 0; phase < phases; phase++) {
35 paint_knob (cr, knob_mode, phase, get_line_width (), get_radius (), x, y);
36 x += get_knob_width ();
40 public abstract void paint_knob (Cairo.Context cr, KnobMode knob_mode, int phase, double lwidth, double radius, double x, double y);
44 } // namespace Prolooks