mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-07 15:25:01 +01:00
tweaks for the monitor section. refactoring of some buttons, using new ArdourKnob instead of VolumeController. New ArdourDisplay shows a controllables user value, and provides support for preset values (hardcoded at present). Further refactoring to come, so that ArdourWidgets are derived from a common class. Controllable now has more responsibility for scaling between internal, user, and interface (knob percent) values. This also needs more refactoring and might have some unintended consequences. tested with audio and nothing seems amiss, yet.
This commit is contained in:
parent
ac9219a3c8
commit
b2b736d596
16 changed files with 967 additions and 31 deletions
|
|
@ -154,6 +154,39 @@ ArdourCanvas::set_source_rgba (Cairo::RefPtr<Cairo::Context> context, Color colo
|
|||
);
|
||||
}
|
||||
|
||||
void
|
||||
ArdourCanvas::set_source_rgb_a (Cairo::RefPtr<Cairo::Context> context, Color color, float alpha)
|
||||
{
|
||||
context->set_source_rgba (
|
||||
((color >> 24) & 0xff) / 255.0,
|
||||
((color >> 16) & 0xff) / 255.0,
|
||||
((color >> 8) & 0xff) / 255.0,
|
||||
alpha
|
||||
);
|
||||
}
|
||||
|
||||
void
|
||||
ArdourCanvas::set_source_rgba (cairo_t *cr, Color color)
|
||||
{
|
||||
cairo_set_source_rgba ( cr,
|
||||
((color >> 24) & 0xff) / 255.0,
|
||||
((color >> 16) & 0xff) / 255.0,
|
||||
((color >> 8) & 0xff) / 255.0,
|
||||
((color >> 0) & 0xff) / 255.0
|
||||
);
|
||||
}
|
||||
|
||||
void
|
||||
ArdourCanvas::set_source_rgb_a (cairo_t *cr, Color color, float alpha)
|
||||
{
|
||||
cairo_set_source_rgba ( cr,
|
||||
((color >> 24) & 0xff) / 255.0,
|
||||
((color >> 16) & 0xff) / 255.0,
|
||||
((color >> 8) & 0xff) / 255.0,
|
||||
alpha
|
||||
);
|
||||
}
|
||||
|
||||
ArdourCanvas::Distance
|
||||
ArdourCanvas::distance_to_segment_squared (Duple const & p, Duple const & p1, Duple const & p2, double& t, Duple& at)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue