summaryrefslogtreecommitdiff
path: root/libs/canvas
diff options
context:
space:
mode:
Diffstat (limited to 'libs/canvas')
-rw-r--r--libs/canvas/arc.cc4
-rw-r--r--libs/canvas/canvas.cc30
-rw-r--r--libs/canvas/canvas/arc.h2
-rw-r--r--libs/canvas/canvas/canvas.h8
-rw-r--r--libs/canvas/canvas/colors.h2
-rw-r--r--libs/canvas/canvas/colorspace.h4
-rw-r--r--libs/canvas/canvas/container.h2
-rw-r--r--libs/canvas/canvas/image.h8
-rw-r--r--libs/canvas/canvas/item.h14
-rw-r--r--libs/canvas/canvas/lookup_table.h14
-rw-r--r--libs/canvas/canvas/polygon.h2
-rw-r--r--libs/canvas/canvas/rectangle.h2
-rw-r--r--libs/canvas/canvas/stateful_image.h4
-rw-r--r--libs/canvas/canvas/text.h2
-rw-r--r--libs/canvas/canvas/types.h2
-rw-r--r--libs/canvas/canvas/visibility.h2
-rw-r--r--libs/canvas/canvas/wave_view.h36
-rw-r--r--libs/canvas/canvas/xfade_curve.h4
-rw-r--r--libs/canvas/colors.cc40
-rw-r--r--libs/canvas/colorspace.cc120
-rw-r--r--libs/canvas/container.cc6
-rw-r--r--libs/canvas/flag.cc4
-rw-r--r--libs/canvas/image.cc6
-rw-r--r--libs/canvas/item.cc20
-rw-r--r--libs/canvas/poly_item.cc10
-rw-r--r--libs/canvas/polygon.cc18
-rw-r--r--libs/canvas/rectangle.cc6
-rw-r--r--libs/canvas/ruler.cc2
-rw-r--r--libs/canvas/scroll_group.cc6
-rw-r--r--libs/canvas/text.cc6
-rw-r--r--libs/canvas/tracking_text.cc2
-rw-r--r--libs/canvas/utils.cc4
-rw-r--r--libs/canvas/wave_view.cc34
-rw-r--r--libs/canvas/xfade_curve.cc2
34 files changed, 214 insertions, 214 deletions
diff --git a/libs/canvas/arc.cc b/libs/canvas/arc.cc
index baec2fafb1..8b462414f8 100644
--- a/libs/canvas/arc.cc
+++ b/libs/canvas/arc.cc
@@ -136,7 +136,7 @@ Arc::covers (Duple const & point) const
double angle_degs = atan (p.y/p.x) * 2.0 * M_PI;
double radius = sqrt (p.x * p.x + p.y * p.y);
- return (angle_degs >= _start_degrees) &&
- (angle_degs <= (_start_degrees + _arc_degrees)) &&
+ return (angle_degs >= _start_degrees) &&
+ (angle_degs <= (_start_degrees + _arc_degrees)) &&
(radius < _radius);
}
diff --git a/libs/canvas/canvas.cc b/libs/canvas/canvas.cc
index 7f9c8fab59..2d88eef5ce 100644
--- a/libs/canvas/canvas.cc
+++ b/libs/canvas/canvas.cc
@@ -72,7 +72,7 @@ Canvas::scroll_to (Coord x, Coord y)
(*i)->scroll_to (Duple (x, y));
}
- pick_current_item (0); // no current mouse position
+ pick_current_item (0); // no current mouse position
}
void
@@ -144,7 +144,7 @@ operator<< (ostream& o, Canvas& c)
std::string
Canvas::indent() const
-{
+{
string s;
for (int n = 0; n < ArdourCanvas::dump_depth; ++n) {
@@ -156,7 +156,7 @@ Canvas::indent() const
std::string
Canvas::render_indent() const
-{
+{
string s;
for (int n = 0; n < ArdourCanvas::render_depth; ++n) {
@@ -258,12 +258,12 @@ Canvas::window_to_canvas (Duple const & d) const
/* XXX January 22nd 2015: leaving this in place for now
* but I think it fixes a bug that really should be
* fixed in a different way (and will be) by my next
- * commit. But it may still be relevant.
+ * commit. But it may still be relevant.
*/
/* If scroll groups overlap, choose the one with the highest sensitivity,
that is, choose an HV scroll group over an H or V
- only group.
+ only group.
*/
if (!best_group || sg->sensitivity() > best_group->sensitivity()) {
best_group = sg;
@@ -406,7 +406,7 @@ GtkCanvas::pick_current_item (int state)
* added or removed, so we have no coordinates to work from as is the
* case with a motion event. Find out where the mouse is and use that.
*/
-
+
Glib::RefPtr<const Gdk::Window> pointer_window = Gdk::Display::get_default()->get_window_at_pointer (x, y);
if (pointer_window != get_window()) {
@@ -559,7 +559,7 @@ GtkCanvas::deliver_enter_leave (Duple const & point, int state)
enter_detail = GDK_NOTIFY_UNKNOWN;
/* no current item, so also send virtual enter events to the
- * entire heirarchy for the new item
+ * entire heirarchy for the new item
*/
for (i = _new_current_item->parent(); i ; i = i->parent()) {
@@ -569,7 +569,7 @@ GtkCanvas::deliver_enter_leave (Duple const & point, int state)
} else if (_current_item->is_descendant_of (*_new_current_item)) {
/* move from descendant to ancestor (X: "_current_item is an
- * inferior ("child") of _new_current_item")
+ * inferior ("child") of _new_current_item")
*
* Deliver "virtual" leave notifications to all items in the
* heirarchy between current and new_current.
@@ -690,7 +690,7 @@ GtkCanvas::deliver_event (GdkEvent* event)
Item* parent = item->parent ();
- if (!item->ignore_events () &&
+ if (!item->ignore_events () &&
item->Event (event)) {
/* this item has just handled the event */
DEBUG_TRACE (
@@ -746,7 +746,7 @@ GtkCanvas::item_going_away (Item* item, boost::optional<Rect> bounding_box)
}
if (_current_item == item) {
- /* no need to send a leave event to this item, since it is going away
+ /* no need to send a leave event to this item, since it is going away
*/
_current_item = 0;
pick_current_item (0); // no mouse state
@@ -797,17 +797,17 @@ GtkCanvas::on_expose_event (GdkEventExpose* ev)
}
Cairo::RefPtr<Cairo::Context> draw_context = Cairo::Context::create (canvas_image);
Cairo::RefPtr<Cairo::Context> window_context = get_window()->create_cairo_context ();
-#else
+#else
Cairo::RefPtr<Cairo::Context> draw_context = get_window()->create_cairo_context ();
#endif
/* draw background color */
-
+
draw_context->rectangle (ev->area.x, ev->area.y, ev->area.width, ev->area.height);
draw_context->clip_preserve ();
set_source_rgba (draw_context, _bg_color);
draw_context->fill ();
-
+
/* render canvas */
if ( _single_exposure ) {
@@ -984,7 +984,7 @@ GtkCanvas::on_motion_notify_event (GdkEventMotion* ev)
copy.motion.x = where.x;
copy.motion.y = where.y;
- /* Coordinates in "copy" will be canvas coordinates,
+ /* Coordinates in "copy" will be canvas coordinates,
*/
DEBUG_TRACE (PBD::DEBUG::CanvasEvents, string_compose ("canvas motion @ %1, %2 canvas @ %3, %4\n", ev->x, ev->y, copy.motion.x, copy.motion.y));
@@ -1277,7 +1277,7 @@ void
GtkCanvasViewport::on_size_request (Gtk::Requisition* req)
{
/* force the canvas to size itself */
- // _canvas.root()->bounding_box();
+ // _canvas.root()->bounding_box();
req->width = 16;
req->height = 16;
diff --git a/libs/canvas/canvas/arc.h b/libs/canvas/canvas/arc.h
index c2b32d9e10..95bd157cbf 100644
--- a/libs/canvas/canvas/arc.h
+++ b/libs/canvas/canvas/arc.h
@@ -42,7 +42,7 @@ public:
void set_arc (double degrees);
void set_start (double degrees);
- Duple center() const {
+ Duple center() const {
return _center;
}
Coord radius () const {
diff --git a/libs/canvas/canvas/canvas.h b/libs/canvas/canvas/canvas.h
index c7054e4c01..c812f8a869 100644
--- a/libs/canvas/canvas/canvas.h
+++ b/libs/canvas/canvas/canvas.h
@@ -114,7 +114,7 @@ public:
void scroll_to (Coord x, Coord y);
void add_scroller (ScrollGroup& i);
-
+
virtual Rect visible_area () const = 0;
virtual Coord width () const = 0;
virtual Coord height () const = 0;
@@ -137,7 +137,7 @@ public:
Duple clamp_to_window (Duple const& winpos, Duple border = Duple());
void zoomed();
-
+
std::string indent() const;
std::string render_indent() const;
void dump (std::ostream&) const;
@@ -210,7 +210,7 @@ protected:
bool motion_notify_handler (GdkEventMotion *);
bool deliver_event (GdkEvent *);
void deliver_enter_leave (Duple const & point, int state);
-
+
void pick_current_item (int state);
void pick_current_item (Duple const &, int state);
@@ -241,7 +241,7 @@ private:
};
/** A GTK::Alignment with a GtkCanvas inside it plus some Gtk::Adjustments for
- * scrolling.
+ * scrolling.
*
* This provides a GtkCanvas that can be scrolled. It does NOT implement the
* Gtk::Scrollable interface.
diff --git a/libs/canvas/canvas/colors.h b/libs/canvas/canvas/colors.h
index 87901b4586..331010e639 100644
--- a/libs/canvas/canvas/colors.h
+++ b/libs/canvas/canvas/colors.h
@@ -25,7 +25,7 @@
#include "canvas/visibility.h"
#include "canvas/types.h"
-namespace ArdourCanvas
+namespace ArdourCanvas
{
struct LIBCANVAS_API HSV;
diff --git a/libs/canvas/canvas/colorspace.h b/libs/canvas/canvas/colorspace.h
index 445b7e2c63..77d0961934 100644
--- a/libs/canvas/canvas/colorspace.h
+++ b/libs/canvas/canvas/colorspace.h
@@ -1,5 +1,5 @@
-/**
- * @file colorspace.h
+/**
+ * @file colorspace.h
* @author Pascal Getreuer 2005-2010 <getreuer@gmail.com>
*/
diff --git a/libs/canvas/canvas/container.h b/libs/canvas/canvas/container.h
index d8a4a316ae..f95f2f9e2b 100644
--- a/libs/canvas/canvas/container.h
+++ b/libs/canvas/canvas/container.h
@@ -51,7 +51,7 @@ public:
/** The render() method is likely to be identical in all containers
* (just call Item::render_children()). It can be overridden as necessary.
- */
+ */
void render (Rect const & area, Cairo::RefPtr<Cairo::Context> context) const;
};
diff --git a/libs/canvas/canvas/image.h b/libs/canvas/canvas/image.h
index 3e6f820963..292de56723 100644
--- a/libs/canvas/canvas/image.h
+++ b/libs/canvas/canvas/image.h
@@ -36,7 +36,7 @@ class LIBCANVAS_API Image : public Item
public:
Image (Canvas *, Cairo::Format, int width, int height);
Image (Item*, Cairo::Format, int width, int height);
-
+
struct Data {
Data (uint8_t *d, int w, int h, int s, Cairo::Format fmt)
: data (d)
@@ -65,12 +65,12 @@ public:
void* destroy_arg;
};
- /**
- * Returns a shared_ptr to a Data object that can be used to
+ /**
+ * Returns a shared_ptr to a Data object that can be used to
* write image data to. The Data object will contain a pointer
* to the buffer, along with image properties that may be
* useful during the data writing.
- *
+ *
* Can be called from any thread BUT ..
*
* ... to avoid collisions with Image deletion, some synchronization method
diff --git a/libs/canvas/canvas/item.h b/libs/canvas/canvas/item.h
index 228a03f6bf..098816cd4a 100644
--- a/libs/canvas/canvas/item.h
+++ b/libs/canvas/canvas/item.h
@@ -78,7 +78,7 @@ public:
/** Adds one or more items to the vector @param items based on their
* covering @param point which is in **window** coordinates
*
- * Note that Item::add_items_at_window_point() is only intended to be
+ * Note that Item::add_items_at_window_point() is only intended to be
* called on items already looked up in a LookupTable (i.e. by a
* parent) and thus known to cover @param point already.
*
@@ -87,8 +87,8 @@ public:
virtual void add_items_at_point (Duple /*point*/, std::vector<Item const *>& items) const;
/** Return true if the item covers @param point, false otherwise.
- *
- * The point is in window coordinates
+ *
+ * The point is in window coordinates
*/
virtual bool covers (Duple const &) const;
@@ -105,19 +105,19 @@ public:
Item* parent () const {
return _parent;
}
-
+
uint32_t depth() const;
const Item* closest_ancestor_with (const Item& other) const;
bool common_ancestor_within (uint32_t, const Item& other) const;
/** returns true if this item is an ancestor of @param candidate,
- * and false otherwise.
+ * and false otherwise.
*/
bool is_ancestor_of (const Item& candidate) const {
return candidate.is_descendant_of (*this);
}
/** returns true if this Item is a descendant of @param candidate,
- * and false otherwise.
+ * and false otherwise.
*/
bool is_descendant_of (const Item& candidate) const;
@@ -160,7 +160,7 @@ public:
Duple window_to_item (Duple const&) const;
Rect item_to_window (Rect const&, bool rounded = true) const;
Rect window_to_item (Rect const&) const;
-
+
void raise_to_top ();
void raise (int);
void lower_to_bottom ();
diff --git a/libs/canvas/canvas/lookup_table.h b/libs/canvas/canvas/lookup_table.h
index 29452365cd..cf52633524 100644
--- a/libs/canvas/canvas/lookup_table.h
+++ b/libs/canvas/canvas/lookup_table.h
@@ -37,7 +37,7 @@ class LIBCANVAS_API LookupTable
public:
LookupTable (Item const &);
virtual ~LookupTable ();
-
+
virtual std::vector<Item*> get (Rect const &) = 0;
virtual std::vector<Item*> items_at_point (Duple const &) const = 0;
virtual bool has_item_at_point (Duple const & point) const = 0;
@@ -51,7 +51,7 @@ class LIBCANVAS_API DumbLookupTable : public LookupTable
{
public:
DumbLookupTable (Item const &);
-
+
std::vector<Item*> get (Rect const &);
std::vector<Item*> items_at_point (Duple const &) const;
bool has_item_at_point (Duple const & point) const;
@@ -65,16 +65,16 @@ public:
std::vector<Item*> get (Rect const &);
std::vector<Item*> items_at_point (Duple const &) const;
bool has_item_at_point (Duple const & point) const;
-
+
static int default_items_per_cell;
-
+
private:
-
+
void area_to_indices (Rect const &, int &, int &, int &, int &) const;
void point_to_indices (Duple, int &, int &) const;
-
+
friend class ::OptimizingLookupTableTest;
-
+
typedef std::vector<Item*> Cell;
int _items_per_cell;
int _dimension;
diff --git a/libs/canvas/canvas/polygon.h b/libs/canvas/canvas/polygon.h
index 9703eb46e9..e0e6b1a1f7 100644
--- a/libs/canvas/canvas/polygon.h
+++ b/libs/canvas/canvas/polygon.h
@@ -42,7 +42,7 @@ public:
mutable float* multiple;
mutable float* constant;
mutable Points::size_type cached_size;
-
+
void cache_shape_computation () const;
};
diff --git a/libs/canvas/canvas/rectangle.h b/libs/canvas/canvas/rectangle.h
index b979a24430..c40d3fccb0 100644
--- a/libs/canvas/canvas/rectangle.h
+++ b/libs/canvas/canvas/rectangle.h
@@ -66,7 +66,7 @@ public:
/** return @param y as a floating point fraction of the overall
* height of the rectangle. @param y is in canvas coordinate space.
- *
+ *
* A value of zero indicates that y is at the bottom of the
* rectangle; a value of 1 indicates that y is at the top.
*
diff --git a/libs/canvas/canvas/stateful_image.h b/libs/canvas/canvas/stateful_image.h
index 7c00b0c5a4..6f4b65fd93 100644
--- a/libs/canvas/canvas/stateful_image.h
+++ b/libs/canvas/canvas/stateful_image.h
@@ -44,7 +44,7 @@ class StatefulImage : public Item
public:
ImageHandle image;
};
-
+
typedef std::vector<State> States;
public:
@@ -71,7 +71,7 @@ class StatefulImage : public Item
double _text_y;
int load_states (const XMLNode&);
-
+
typedef std::map<std::string,Cairo::RefPtr<Cairo::ImageSurface> > ImageCache;
static ImageCache _image_cache;
static PBD::Searchpath _image_search_path;
diff --git a/libs/canvas/canvas/text.h b/libs/canvas/canvas/text.h
index f42a282c8e..24251c215b 100644
--- a/libs/canvas/canvas/text.h
+++ b/libs/canvas/canvas/text.h
@@ -65,7 +65,7 @@ private:
mutable bool _need_redraw;
mutable double _width_correction;
double _clamped_width;
-
+
void _redraw () const;
};
diff --git a/libs/canvas/canvas/types.h b/libs/canvas/canvas/types.h
index dbd9683b75..c43be9bbdd 100644
--- a/libs/canvas/canvas/types.h
+++ b/libs/canvas/canvas/types.h
@@ -65,7 +65,7 @@ struct LIBCANVAS_API Duple
: x (x_)
, y (y_)
{}
-
+
Coord x;
Coord y;
diff --git a/libs/canvas/canvas/visibility.h b/libs/canvas/canvas/visibility.h
index e44fe86705..e0573e6ef1 100644
--- a/libs/canvas/canvas/visibility.h
+++ b/libs/canvas/canvas/visibility.h
@@ -38,7 +38,7 @@
#define LIBCANVAS_API LIBCANVAS_DLL_EXPORT
#else
#define LIBCANVAS_API LIBCANVAS_DLL_IMPORT
- #endif
+ #endif
#define LIBCANVAS_LOCAL LIBCANVAS_DLL_LOCAL
#endif
diff --git a/libs/canvas/canvas/wave_view.h b/libs/canvas/canvas/wave_view.h
index 51c14c1d2e..20c3ad5cce 100644
--- a/libs/canvas/canvas/wave_view.h
+++ b/libs/canvas/canvas/wave_view.h
@@ -53,7 +53,7 @@ struct LIBCANVAS_API WaveViewThreadRequest
Cancel,
Draw
};
-
+
WaveViewThreadRequest () : stop (0) {}
bool should_stop () const { return (bool) g_atomic_int_get (const_cast<gint*>(&stop)); }
@@ -113,7 +113,7 @@ class LIBCANVAS_API WaveViewCache
uint64_t timestamp;
Entry (int chan, Coord hght, float amp, Color fcl, double spp, framepos_t strt, framepos_t ed,
- Cairo::RefPtr<Cairo::ImageSurface> img)
+ Cairo::RefPtr<Cairo::ImageSurface> img)
: channel (chan)
, height (hght)
, amplitude (amp)
@@ -165,14 +165,14 @@ class LIBCANVAS_API WaveViewCache
*/
typedef std::pair<boost::shared_ptr<ARDOUR::AudioSource>,boost::shared_ptr<Entry> > ListEntry;
typedef std::vector<ListEntry> CacheList;
-
+
struct SortByTimestamp {
bool operator() (const WaveViewCache::ListEntry& a, const WaveViewCache::ListEntry& b) {
return a.second->timestamp < b.second->timestamp;
}
};
friend struct SortByTimestamp;
-
+
uint64_t image_cache_size;
uint64_t _image_cache_threshold;
@@ -185,7 +185,7 @@ class LIBCANVAS_API WaveView : public Item, public sigc::trackable
{
public:
- enum Shape {
+ enum Shape {
Normal,
Rectified
};
@@ -201,13 +201,13 @@ public:
x = 0 in the waveview corresponds to the first waveform datum taken
from region->start() samples into the source data.
-
- x = N in the waveview corresponds to the (N * spp)'th sample
+
+ x = N in the waveview corresponds to the (N * spp)'th sample
measured from region->start() into the source data.
-
+
when drawing, we will map the zeroth-pixel of the waveview
- into a window.
-
+ into a window.
+
The waveview itself contains a set of pre-rendered Cairo::ImageSurfaces
that cache sections of the display. This is filled on-demand and
never cleared until something explicitly marks the cache invalid
@@ -221,7 +221,7 @@ public:
void render (Rect const & area, Cairo::RefPtr<Cairo::Context>) const;
void compute_bounding_box () const;
-
+
void set_samples_per_pixel (double);
void set_height (Distance);
void set_channel (int);
@@ -252,7 +252,7 @@ public:
void set_shape (Shape);
void set_always_get_image_in_thread (bool yn);
-
+
/* currently missing because we don't need them (yet):
set_shape_independent();
set_logscaled_independent()
@@ -262,7 +262,7 @@ public:
static void set_global_logscaled (bool);
static void set_global_shape (Shape);
static void set_global_show_waveform_clipping (bool);
-
+
static double global_gradient_depth() { return _global_gradient_depth; }
static bool global_logscaled() { return _global_logscaled; }
static Shape global_shape() { return _global_shape; }
@@ -336,7 +336,7 @@ public:
mutable bool get_image_in_thread;
/** If true, calls to get_image() will render a missing wave image
- in the calling thread. Set true for waveviews we expect to
+ in the calling thread. Set true for waveviews we expect to
keep updating (e.g. while recording)
*/
bool always_get_image_in_thread;
@@ -371,7 +371,7 @@ public:
double spread;
bool clip_max;
bool clip_min;
-
+
LineTips() : top (0.0), bot (0.0), clip_max (false), clip_min (false) {}
};
@@ -388,11 +388,11 @@ public:
void queue_get_image (boost::shared_ptr<const ARDOUR::Region> region, framepos_t start, framepos_t end) const;
void generate_image (boost::shared_ptr<WaveViewThreadRequest>, bool in_render_thread) const;
boost::shared_ptr<WaveViewCache::Entry> cache_request_result (boost::shared_ptr<WaveViewThreadRequest> req) const;
-
+
void image_ready ();
-
+
mutable boost::shared_ptr<WaveViewCache::Entry> _current_image;
-
+
mutable boost::shared_ptr<WaveViewThreadRequest> current_request;
static WaveViewCache* images;
diff --git a/libs/canvas/canvas/xfade_curve.h b/libs/canvas/canvas/xfade_curve.h
index 60c1c45e23..b6e871936b 100644
--- a/libs/canvas/canvas/xfade_curve.h
+++ b/libs/canvas/canvas/xfade_curve.h
@@ -41,7 +41,7 @@ public:
void set_fade_position (XFadePosition xfp) { _xfadeposition = xfp; }
void set_show_background_fade (bool show) { show_background_fade = show; }
-
+
void compute_bounding_box () const;
void render (Rect const & area, Cairo::RefPtr<Cairo::Context>) const;
@@ -81,7 +81,7 @@ private:
Color _fill_color;
bool show_background_fade;
-
+
void interpolate ();
};
diff --git a/libs/canvas/colors.cc b/libs/canvas/colors.cc
index a747124cb2..03bfd8d4ce 100644
--- a/libs/canvas/colors.cc
+++ b/libs/canvas/colors.cc
@@ -76,7 +76,7 @@ ArdourCanvas::color_to_hsva (Color color, double& h, double& s, double& v, doubl
if (cmax == 0) {
// r = g = b == 0 ... v is undefined, s = 0
- s = 0.0;
+ s = 0.0;
h = 0.0;
return;
}
@@ -135,7 +135,7 @@ ArdourCanvas::hsva_to_color (double h, double s, double v, double a)
return rgba_to_color (x + m, m, c + m, a);
} else if (h >= 300.0 && h < 360.0) {
return rgba_to_color (c + m, m, x + m, a);
- }
+ }
return rgba_to_color (m, m, m, a);
}
@@ -172,8 +172,8 @@ ArdourCanvas::rgba_to_color (double r, double g, double b, double a)
}
// Inverse of sRGB "gamma" function.
-static inline double
-inv_gam_sRGB (double c)
+static inline double
+inv_gam_sRGB (double c)
{
if (c <= 0.04045) {
return c/12.92;
@@ -183,8 +183,8 @@ inv_gam_sRGB (double c)
}
// sRGB "gamma" function
-static inline int
-gam_sRGB(double v)
+static inline int
+gam_sRGB(double v)
{
if (v <= 0.0031308) {
v *= 12.92;
@@ -194,7 +194,7 @@ gam_sRGB(double v)
return int (v*255+.5);
}
-static double
+static double
luminance (uint32_t c)
{
// sRGB luminance(Y) values
@@ -205,9 +205,9 @@ luminance (uint32_t c)
double r, g, b, a;
ArdourCanvas::color_to_rgba (c, r, g, b, a);
-
+
return (gam_sRGB (rY*inv_gam_sRGB(r) + gY*inv_gam_sRGB(g) + bY*inv_gam_sRGB(b))) / 255.0;
-}
+}
uint32_t
ArdourCanvas::contrasting_text_color (uint32_t c)
@@ -226,7 +226,7 @@ HSV::HSV ()
: h (0.0)
, s (1.0)
, v (1.0)
- , a (1.0)
+ , a (1.0)
{
}
@@ -234,7 +234,7 @@ HSV::HSV (double hh, double ss, double vv, double aa)
: h (hh)
, s (ss)
, v (vv)
- , a (aa)
+ , a (aa)
{
if (h < 0.0) {
/* normalize negative hue values into positive range */
@@ -345,8 +345,8 @@ HSV::shade (double factor) const
/* algorithm derived from a google palette website
and analysis of their color palettes.
- basic rule: to make a color darker, increase its saturation
- until it reaches 88%, but then additionally reduce value/lightness
+ basic rule: to make a color darker, increase its saturation
+ until it reaches 88%, but then additionally reduce value/lightness
by a larger amount.
invert rule to make a color lighter.
@@ -355,12 +355,12 @@ HSV::shade (double factor) const
if (factor > 1.0) {
if (s < 88) {
hsv.v += (hsv.v * (factor * 10.0));
- }
+ }
hsv.s *= factor;
} else {
if (s < 88) {
hsv.v -= (hsv.v * (factor * 10.0));
- }
+ }
hsv.s *= factor;
}
@@ -420,13 +420,13 @@ HSV::distance (const HSV& other) const
if (is_gray() && other.is_gray()) {
/* human color perception of achromatics generates about 450
distinct colors. By contrast, CIE94 could give a maximal
- perceptual distance of sqrt ((360^2) + 1 + 1) = 360. The 450
+ perceptual distance of sqrt ((360^2) + 1 + 1) = 360. The 450
are not evenly spread (Webers Law), so lets use 360 as an
approximation of the number of distinct achromatics.
-
+
So, scale up the achromatic difference to give about
a maximal distance between v = 1.0 and v = 0.0 of 360.
-
+
A difference of about 0.0055 will generate a return value of
2, which is roughly the limit of human perceptual
discrimination for chromatics.
@@ -444,7 +444,7 @@ HSV::distance (const HSV& other) const
double sL, sA, sB;
double oL, oA, oB;
double r, g, b, alpha; // Careful, "a" is a field of this
- Color c;
+ Color c;
c = hsva_to_color (h, s, v, a);
color_to_rgba (c, r, g, b, alpha);
@@ -458,7 +458,7 @@ HSV::distance (const HSV& other) const
const double whtL = 1.0;
const double whtC = 1.0;
- const double whtH = 1.0;
+ const double whtH = 1.0;
const double xC1 = sqrt ((sA * sA) + (sB * oB));
const double xC2 = sqrt ((oA * oA) + (oB * oB));
diff --git a/libs/canvas/colorspace.cc b/libs/canvas/colorspace.cc
index 5a71b715be..f4480e7dc0 100644
--- a/libs/canvas/colorspace.cc
+++ b/libs/canvas/colorspace.cc
@@ -4,7 +4,7 @@
*
* == Summary ==
* This file implements routines for color transformations between the spaces
- * sRGB, Y'UV, Y'CbCr, Y'PbPr, Y'DbDr, Y'IQ, HSV, HSL, HSI, CIEXYZ, CIELAB,
+ * sRGB, Y'UV, Y'CbCr, Y'PbPr, Y'DbDr, Y'IQ, HSV, HSL, HSI, CIEXYZ, CIELAB,
* CIELUV, CIELCH, and CIECAT02 LMS.
*
* == Usage ==
@@ -15,13 +15,13 @@
double S[3] = {173, 0.8, 0.5};
double D[3];
colortransform Trans;
-
+
if(!(GetColorTransform(&Trans, "HSI -> Lab")))
{
printf("Invalid syntax or unknown color space\n");
return;
- }
-
+ }
+
ApplyColorTransform(Trans, &D[0], &D[1], &D[2], S[0], S[1], S[2]);
@endcode
* "num" is a typedef defined at the beginning of colorspace.h that may be set
@@ -36,15 +36,15 @@
Lab2Rgb(&R, &G, &B, L, a, b);
@endcode
* Generally, the calling syntax is
-@code
+@code
Foo2Bar(&B0, &B1, &B2, F0, F1, F2);
-@endcode
+@endcode
* where (F0,F1,F2) are the coordinates of a color in space "Foo" and
- * (B0,B1,B2) are the transformed coordinates in space "Bar." For any
+ * (B0,B1,B2) are the transformed coordinates in space "Bar." For any
* transformation routine, its inverse has the sytax
-@code
+@code
Bar2Foo(&F0, &F1, &F2, B0, B1, B2);
-@endcode
+@endcode
*
* The conversion routines are consistently named with the first letter of a
* color space capitalized with following letters in lower case and omitting
@@ -52,7 +52,7 @@
* any transformation routine Foo2Bar, its inverse is Bar2Foo.
*
* All transformations assume a two degree observer angle and a D65 illuminant.
- * The white point can be changed by modifying the WHITEPOINT_X, WHITEPOINT_Y,
+ * The white point can be changed by modifying the WHITEPOINT_X, WHITEPOINT_Y,
* WHITEPOINT_Z definitions at the beginning of colorspace.h.
*
* == List of transformation routines ==
@@ -69,22 +69,22 @@
* - Xyz2Lab(double *L, double *a, double *b, double X, double Y, double Z)
* - Xyz2Luv(double *L, double *u, double *v, double X, double Y, double Z)
* - Xyz2Lch(double *L, double *C, double *h, double X, double Y, double Z)
- * - Xyz2Cat02lms(double *L, double *M, double *S, double X, double Y, double Z)
+ * - Xyz2Cat02lms(double *L, double *M, double *S, double X, double Y, double Z)
* - Rgb2Lab(double *L, double *a, double *b, double R, double G, double B)
* - Rgb2Luv(double *L, double *u, double *v, double R, double G, double B)
* - Rgb2Lch(double *L, double *C, double *h, double R, double G, double B)
- * - Rgb2Cat02lms(double *L, double *M, double *S, double R, double G, double B)
+ * - Rgb2Cat02lms(double *L, double *M, double *S, double R, double G, double B)
* (Similarly for the inverse transformations.)
*
* It is possible to transform between two arbitrary color spaces by first
* transforming from the source space to sRGB and then transforming from
* sRGB to the desired destination space. For transformations between CIE
* color spaces, it is convenient to use XYZ as the intermediate space. This
- * is the strategy used by GetColorTransform and ApplyColorTransform.
+ * is the strategy used by GetColorTransform and ApplyColorTransform.
*
* == References ==
* The definitions of these spaces and the many of the transformation formulas
- * can be found in
+ * can be found in
*
* Poynton, "Frequently Asked Questions About Gamma"
* http://www.poynton.com/notes/colour_and_gamma/GammaFAQ.html
@@ -108,25 +108,25 @@
* == License (BSD) ==
* Copyright (c) 2005-2010, Pascal Getreuer
* All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
+ *
+ * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
- *
- * - Redistributions of source code must retain the above copyright
+ *
+ * - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
+ * - Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the distribution.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
@@ -154,7 +154,7 @@
#define M_PI 3.14159265358979323846264338327950288
#endif
-/**
+/**
* @brief sRGB gamma correction, transforms R to R'
* http://en.wikipedia.org/wiki/SRGB
*/
@@ -162,14 +162,14 @@
(((t) <= 0.0031306684425005883) ? \
(12.92*(t)) : (1.055*pow((t), 0.416666666666666667) - 0.055))
-/**
- * @brief Inverse sRGB gamma correction, transforms R' to R
+/**
+ * @brief Inverse sRGB gamma correction, transforms R' to R
*/
#define INVGAMMACORRECTION(t) \
(((t) <= 0.0404482362771076) ? \
((t)/12.92) : pow(((t) + 0.055)/1.055, 2.4))
-/**
+/**
* @brief CIE L*a*b* f function (used to convert XYZ to L*a*b*)
* http://en.wikipedia.org/wiki/Lab_color_space
*/
@@ -177,8 +177,8 @@
((t >= 8.85645167903563082e-3) ? \
pow(t,0.333333333333333) : (841.0/108.0)*(t) + (4.0/29.0))
-/**
- * @brief CIE L*a*b* inverse f function
+/**
+ * @brief CIE L*a*b* inverse f function
* http://en.wikipedia.org/wiki/Lab_color_space
*/
#define LABINVF(t) \
@@ -215,7 +215,7 @@
/*
* == Linear color transformations ==
- *
+ *
* The following routines implement transformations between sRGB and
* the linearly-related color spaces Y'UV, Y'PbPr, Y'DbDr, and Y'IQ.
*/
@@ -346,15 +346,15 @@ void Yiq2Rgb(double *R, double *G, double *B, double Y, double I, double Q)
/*
* == Hue Saturation Value/Lightness/Intensity color transformations ==
- *
+ *
* The following routines implement transformations between sRGB and
* color spaces HSV, HSL, and HSI.
*/
-/**
+/**
* @brief Convert an sRGB color to Hue-Saturation-Value (HSV)
- *
+ *
* @param H, S, V pointers to hold the result
* @param R, G, B the input sRGB values scaled in [0,1]
*
@@ -399,16 +399,16 @@ void Rgb2Hsv(double *H, double *S, double *V, double R, double G, double B)
}
-/**
+/**
* @brief Convert a Hue-Saturation-Value (HSV) color to sRGB
- *
+ *
* @param R, G, B pointers to hold the result
* @param H, S, V the input HSV values
*
- * The input values are assumed to be scaled as
+ * The input values are assumed to be scaled as
* 0 <= H < 360,
* 0 <= S <= 1,
- * 0 <= V <= 1.
+ * 0 <= V <= 1.
* The output sRGB values are scaled between 0 and 1. This is the inverse
* transformation of Rgb2Hsv.
*
@@ -463,9 +463,9 @@ void Hsv2Rgb(double *R, double *G, double *B, double H, double S, double V)
}
-/**
+/**
* @brief Convert an sRGB color to Hue-Saturation-Lightness (HSL)
- *
+ *
* @param H, S, L pointers to hold the result
* @param R, G, B the input sRGB values scaled in [0,1]
*
@@ -511,16 +511,16 @@ void Rgb2Hsl(double *H, double *S, double *L, double R, double G, double B)
}
-/**
+/**
* @brief Convert a Hue-Saturation-Lightness (HSL) color to sRGB
- *
+ *
* @param R, G, B pointers to hold the result
* @param H, S, L the input HSL values
*
- * The input values are assumed to be scaled as
+ * The input values are assumed to be scaled as
* 0 <= H < 360,
* 0 <= S <= 1,
- * 0 <= L <= 1.
+ * 0 <= L <= 1.
* The output sRGB values are scaled between 0 and 1. This is the inverse
* transformation of Rgb2Hsl.
*
@@ -575,9 +575,9 @@ void Hsl2Rgb(double *R, double *G, double *B, double H, double S, double L)
}
-/**
+/**
* @brief Convert an sRGB color to Hue-Saturation-Intensity (HSI)
- *
+ *
* @param H, S, I pointers to hold the result
* @param R, G, B the input sRGB values scaled in [0,1]
*
@@ -611,16 +611,16 @@ void Rgb2Hsi(double *H, double *S, double *I, double R, double G, double B)
}
-/**
+/**
* @brief Convert a Hue-Saturation-Intesity (HSI) color to sRGB
- *
+ *
* @param R, G, B pointers to hold the result
* @param H, S, I the input HSI values
*
- * The input values are assumed to be scaled as
+ * The input values are assumed to be scaled as
* 0 <= H < 360,
* 0 <= S <= 1,
- * 0 <= I <= 1.
+ * 0 <= I <= 1.
* The output sRGB values are scaled between 0 and 1. This is the inverse
* transformation of Rgb2Hsi.
*
@@ -655,9 +655,9 @@ void Hsi2Rgb(double *R, double *G, double *B, double H, double S, double I)
/*
* == CIE color transformations ==
- *
+ *
* The following routines implement transformations between sRGB and
- * the CIE color spaces XYZ, L*a*b, L*u*v*, and L*C*H*. These
+ * the CIE color spaces XYZ, L*a*b, L*u*v*, and L*C*H*. These
* transforms assume a 2 degree observer angle and a D65 illuminant.
*/
@@ -668,7 +668,7 @@ void Hsi2Rgb(double *R, double *G, double *B, double H, double S, double I)
* @param X, Y, Z pointers to hold the result
* @param R, G, B the input sRGB values
*
- * Poynton, "Frequently Asked Questions About Color," page 10
+ * Poynton, "Frequently Asked Questions About Color," page 10
* Wikipedia: http://en.wikipedia.org/wiki/SRGB
* Wikipedia: http://en.wikipedia.org/wiki/CIE_1931_color_space
*/
@@ -748,7 +748,7 @@ void Xyz2Lab(double *L, double *a, double *b, double X, double Y, double Z)
* @param X, Y, Z pointers to hold the result
* @param L, a, b the input L*a*b* values
*
- * Wikipedia: http://en.wikipedia.org/wiki/Lab_color_space
+ * Wikipedia: http://en.wikipedia.org/wiki/Lab_color_space
*/
void Lab2Xyz(double *X, double *Y, double *Z, double L, double a, double b)
{
@@ -873,7 +873,7 @@ void Cat02lms2Xyz(double *X, double *Y, double *Z, double L, double M, double S)
}
-/*
+/*
* == Glue functions for multi-stage transforms ==
*/
diff --git a/libs/canvas/container.cc b/libs/canvas/container.cc
index 6aa265fd81..834e48196d 100644
--- a/libs/canvas/container.cc
+++ b/libs/canvas/container.cc
@@ -21,18 +21,18 @@
using namespace ArdourCanvas;
-Container::Container (Canvas* canvas)
+Container::Container (Canvas* canvas)
: Item (canvas)
{
}
-Container::Container (Item* parent)
+Container::Container (Item* parent)
: Item (parent)
{
}
-Container::Container (Item* parent, Duple const & p)
+Container::Container (Item* parent, Duple const & p)
: Item (parent, p)
{
}
diff --git a/libs/canvas/flag.cc b/libs/canvas/flag.cc
index 87c3cc281c..e3e9e409a2 100644
--- a/libs/canvas/flag.cc
+++ b/libs/canvas/flag.cc
@@ -43,7 +43,7 @@ Flag::Flag (Item* parent, Distance height, Color outline_color, Color fill_color
setup (height, position);
}
-void
+void
Flag::setup (Distance height, Duple position)
{
_text = new Text (this);
@@ -108,7 +108,7 @@ Flag::covers (Duple const & point) const
{
if (_rectangle) {
return _rectangle->covers (point);
- }
+ }
return false;
}
diff --git a/libs/canvas/image.cc b/libs/canvas/image.cc
index 46cadd0d1c..d6c42d28ef 100644
--- a/libs/canvas/image.cc
+++ b/libs/canvas/image.cc
@@ -42,7 +42,7 @@ Image::Image (Item* parent, Cairo::Format fmt, int width, int height)
DataReady.connect (data_connections, MISSING_INVALIDATOR, boost::bind (&Image::accept_data, this), gui_context());
}
-void
+void
Image::render (Rect const& area, Cairo::RefPtr<Cairo::Context> context) const
{
if (_need_render && _pending) {
@@ -96,12 +96,12 @@ Image::put_image (boost::shared_ptr<Data> d)
}
void
-Image::accept_data ()
+Image::accept_data ()
{
/* must be executed in gui thread */
begin_change ();
_need_render = true;
end_change (); // notify canvas that we need redrawing
-}
+}
diff --git a/libs/canvas/item.cc b/libs/canvas/item.cc
index ab8764a97a..ab68ea2e95 100644
--- a/libs/canvas/item.cc
+++ b/libs/canvas/item.cc
@@ -126,9 +126,9 @@ Item::canvas_origin () const
}
Duple
-Item::window_origin () const
+Item::window_origin () const
{
- /* This is slightly subtle. Our _position is in the coordinate space of
+ /* This is slightly subtle. Our _position is in the coordinate space of
our parent. So to find out where that is in window coordinates, we
have to ask our parent.
*/
@@ -150,7 +150,7 @@ Item::scroll_offset () const
{
if (_scroll_parent) {
return _scroll_parent->scroll_offset();
- }
+ }
return Duple (0,0);
}
@@ -583,7 +583,7 @@ Item::bounding_box () const
}
Coord
-Item::height () const
+Item::height () const
{
boost::optional<ArdourCanvas::Rect> bb = bounding_box();
@@ -594,7 +594,7 @@ Item::height () const
}
Coord
-Item::width () const
+Item::width () const
{
boost::optional<ArdourCanvas::Rect> bb = bounding_box();
@@ -688,7 +688,7 @@ Item::set_ignore_events (bool ignore)
}
std::string
-Item::whatami () const
+Item::whatami () const
{
std::string type = demangle (typeid (*this).name());
return type.substr (type.find_last_of (':') + 1);
@@ -738,7 +738,7 @@ Item::render_children (Rect const & area, Cairo::RefPtr<Cairo::Context> context)
#ifdef CANVAS_DEBUG
if (DEBUG_ENABLED(PBD::DEBUG::CanvasRender)) {
- cerr << string_compose ("%1%7 %2 @ %7 render %5 @ %6 %3 items out of %4\n",
+ cerr << string_compose ("%1%7 %2 @ %7 render %5 @ %6 %3 items out of %4\n",
_canvas->render_indent(), (name.empty() ? string ("[unnamed]") : name), items.size(), _items.size(), area, _position, this,
whatami());
}
@@ -778,7 +778,7 @@ Item::render_children (Rect const & area, Cairo::RefPtr<Cairo::Context> context)
if (DEBUG_ENABLED(PBD::DEBUG::CanvasRender)) {
if (dynamic_cast<Container*>(*i) == 0) {
cerr << _canvas->render_indent() << "render "
- << ' '
+ << ' '
<< (*i)
<< ' '
<< (*i)->whatami()
@@ -786,11 +786,11 @@ Item::render_children (Rect const & area, Cairo::RefPtr<Cairo::Context> context)
<< (*i)->name
<< " item "
<< item_bbox.get()
- << " window = "
+ << " window = "
<< item
<< " intersect = "
<< draw
- << " @ "
+ << " @ "
<< _position
<< endl;
}
diff --git a/libs/canvas/poly_item.cc b/libs/canvas/poly_item.cc
index c66c3bbb7a..b6c97c3a3b 100644
--- a/libs/canvas/poly_item.cc
+++ b/libs/canvas/poly_item.cc
@@ -114,11 +114,11 @@ PolyItem::render_curve (Rect const & area, Cairo::RefPtr<Cairo::Context> context
c = item_to_window (Duple (p->x, p->y));
- context->curve_to (c1.x + pixel_adjust,
- c1.y + pixel_adjust,
- c2.x + pixel_adjust,
- c2.y + pixel_adjust,
- c.x + pixel_adjust,
+ context->curve_to (c1.x + pixel_adjust,
+ c1.y + pixel_adjust,
+ c2.x + pixel_adjust,
+ c2.y + pixel_adjust,
+ c.x + pixel_adjust,
c.y + pixel_adjust);
++cp1;
diff --git a/libs/canvas/polygon.cc b/libs/canvas/polygon.cc
index fdc1061d74..5aa58eb614 100644
--- a/libs/canvas/polygon.cc
+++ b/libs/canvas/polygon.cc
@@ -72,7 +72,7 @@ Polygon::render (Rect const & area, Cairo::RefPtr<Cairo::Context> context) const
}
}
-void
+void
Polygon::cache_shape_computation () const
{
Points::size_type npoints = _points.size();
@@ -95,17 +95,17 @@ Polygon::cache_shape_computation () const
for (i = 0; i < npoints; i++) {
if (_points[j].y == _points[i].y) {
constant[i] = _points[i].x;
- multiple[i] = 0;
+ multiple[i] = 0;
} else {
constant[i] = _points[i].x-(_points[i].y*_points[j].x)/(_points[j].y-_points[i].y)+(_points[i].y*_points[i].x)/(_points[j].y-_points[i].y);
- multiple[i] = (_points[j].x-_points[i].x)/(_points[j].y-_points[i].y);
+ multiple[i] = (_points[j].x-_points[i].x)/(_points[j].y-_points[i].y);
}
- j = i;
+ j = i;
}
}
-bool
+bool
Polygon::covers (Duple const & point) const
{
Duple p = window_to_item (point);
@@ -126,13 +126,13 @@ Polygon::covers (Duple const & point) const
for (i = 0; i < npoints; i++) {
if (((_points[i].y < p.y && _points[j].y >= p.y) || (_points[j].y < p.y && _points[i].y >= p.y))) {
- oddNodes ^= (p.y * multiple[i] + constant[i] < p.x);
+ oddNodes ^= (p.y * multiple[i] + constant[i] < p.x);
}
- j = i;
+ j = i;
}
- return oddNodes;
-}
+ return oddNodes;
+}
void
Polygon::compute_bounding_box () const
diff --git a/libs/canvas/rectangle.cc b/libs/canvas/rectangle.cc
index cdc8d226e5..e6ff6b37d0 100644
--- a/libs/canvas/rectangle.cc
+++ b/libs/canvas/rectangle.cc
@@ -88,7 +88,7 @@ Rectangle::render_self (Rect const & area, Cairo::RefPtr<Cairo::Context> context
context->rectangle (draw.x0, draw.y0, draw.width(), draw.height());
context->fill ();
- }
+ }
if (_outline) {
@@ -103,7 +103,7 @@ Rectangle::render_self (Rect const & area, Cairo::RefPtr<Cairo::Context> context
* to be colored are actually "at" 0.5 and 10.5 (midway
* between the integer coordinates).
*
- * See the Cairo FAQ on single pixel lines for more
+ * See the Cairo FAQ on single pixel lines for more
* detail.
*/
@@ -163,7 +163,7 @@ Rectangle::compute_bounding_box () const
bounding box is 1.0 pixels outside the stated
corners of the rectangle (so that the middle
of the 2 pixel wide border passes through
- the corners, alternatively described as 1 row
+ the corners, alternatively described as 1 row
of pixels outside of the corners, and 1 row
inside).
diff --git a/libs/canvas/ruler.cc b/libs/canvas/ruler.cc
index 5fa9cb5493..b538cbb314 100644
--- a/libs/canvas/ruler.cc
+++ b/libs/canvas/ruler.cc
@@ -191,7 +191,7 @@ Ruler::render (Rect const & area, Cairo::RefPtr<Cairo::Context> cr) const
}
if (_divide_height >= 0.0) {
-
+
cr->set_line_width (1.0);
set_source_rgba (cr, _divider_color_top);
diff --git a/libs/canvas/scroll_group.cc b/libs/canvas/scroll_group.cc
index 3feb37f83a..aecea962f6 100644
--- a/libs/canvas/scroll_group.cc
+++ b/libs/canvas/scroll_group.cc
@@ -94,7 +94,7 @@ ScrollGroup::covers_canvas (Duple const& d) const
to consider the position of the bounding box
within the canvas.
*/
-
+
return r->translate (position()).contains (d);
}
@@ -109,8 +109,8 @@ ScrollGroup::covers_window (Duple const& d) const
/* Bounding box is in item coordinates, but we need
to consider the position of the bounding box
- within the canvas.
+ within the canvas.
*/
-
+
return r->translate (position()).contains (d);
}
diff --git a/libs/canvas/text.cc b/libs/canvas/text.cc
index 9529d7736a..fbf7d7943c 100644
--- a/libs/canvas/text.cc
+++ b/libs/canvas/text.cc
@@ -120,7 +120,7 @@ Text::_redraw () const
}
layout->set_alignment (_alignment);
-
+
int w;
int h;
@@ -158,7 +158,7 @@ Text::_redraw () const
}
/* text has now been rendered in _image and is ready for blit in
- * ::render
+ * ::render
*/
_need_redraw = false;
@@ -291,6 +291,6 @@ Text::text_width() const
if (_need_redraw) {
redraw ();
}
-
+
return _width;
}
diff --git a/libs/canvas/tracking_text.cc b/libs/canvas/tracking_text.cc
index c5f754068c..7f945dc7ce 100644
--- a/libs/canvas/tracking_text.cc
+++ b/libs/canvas/tracking_text.cc
@@ -112,7 +112,7 @@ TrackingText::show_and_track (bool tx, bool ty)
if (!was_visible) {
/* move to current pointer location. do this after show() so that
- * _visible is true, and thus ::pointer_motion() will do
+ * _visible is true, and thus ::pointer_motion() will do
* something.
*/
Duple winpos;
diff --git a/libs/canvas/utils.cc b/libs/canvas/utils.cc
index 1eb11f422d..7b81cf5951 100644
--- a/libs/canvas/utils.cc
+++ b/libs/canvas/utils.cc
@@ -87,12 +87,12 @@ ArdourCanvas::distance_to_segment_squared (Duple const & p, Duple const & p1, Du
at = p1;
t = 0.0;
return ((dp1x * dp1x) + (dp1y * dp1y));
- }
+ }
// Project a line from p to the segment [p1,p2]. By considering the line
// extending the segment, parameterized as p1 + (t * (p2 - p1)),
- // we find projection of point p onto the line.
+ // we find projection of point p onto the line.
// It falls where t = [(p - p1) . (p2 - p1)] / |p2 - p1|^2
t = ((dp1x * dx) + (dp1y * dy)) / segLenSquared;
diff --git a/libs/canvas/wave_view.cc b/libs/canvas/wave_view.cc
index a82ae59d18..7f0aed6dff 100644
--- a/libs/canvas/wave_view.cc
+++ b/libs/canvas/wave_view.cc
@@ -273,8 +273,8 @@ WaveView::compute_tips (PeakData const & peak, WaveView::LineTips& tips) const
{
const double effective_height = _height;
- /* remember: canvas (and cairo) coordinate space puts the origin at the upper left.
-
+ /* remember: canvas (and cairo) coordinate space puts the origin at the upper left.
+
So, a sample value of 1.0 (0dbFS) will be computed as:
(1.0 - 1.0) * 0.5 * effective_height
@@ -606,7 +606,7 @@ WaveView::draw_image (Cairo::RefPtr<Cairo::ImageSurface>& image, PeakData* _peak
}
}
- /* zero line, show only if there is enough spread
+ /* zero line, show only if there is enough spread
or the waveform line does not cross zero line */
if (show_zero_line() && ((tips[i].spread >= 5.0) || (tips[i].top > height_zero ) || (tips[i].bot < height_zero)) ) {
@@ -790,8 +790,8 @@ WaveView::get_image (framepos_t start, framepos_t end, bool& full_image) const
* while we're here.
*/
- DEBUG_TRACE (DEBUG::WaveView, string_compose ("%1 CR %2 stop? %3 image %4\n", this, current_request,
- (current_request ? current_request->should_stop() : false),
+ DEBUG_TRACE (DEBUG::WaveView, string_compose ("%1 CR %2 stop? %3 image %4\n", this, current_request,
+ (current_request ? current_request->should_stop() : false),
(current_request ? current_request->image : 0)));
if (current_request && !current_request->should_stop() && current_request->image) {
@@ -836,7 +836,7 @@ WaveView::get_image (framepos_t start, framepos_t end, bool& full_image) const
if (!ret || !full_image) {
if ((rendered && get_image_in_thread) || always_get_image_in_thread) {
-
+
DEBUG_TRACE (DEBUG::WaveView, string_compose ("%1: generating image in caller thread\n", name));
boost::shared_ptr<WaveViewThreadRequest> req (new WaveViewThreadRequest);
@@ -894,19 +894,19 @@ WaveView::get_image_from_cache (framepos_t start, framepos_t end, bool& full) co
framecnt_t
WaveView::desired_image_width () const
{
- /* compute how wide the image should be, in samples.
+ /* compute how wide the image should be, in samples.
*
- * We want at least 1 canvas width's worth, but if that
+ * We want at least 1 canvas width's worth, but if that
* represents less than 1/10th of a second, use 1/10th of
* a second instead.
*/
-
+
framecnt_t canvas_width_samples = _canvas->visible_area().width() * _samples_per_pixel;
const framecnt_t one_tenth_of_second = _region->session().frame_rate() / 10;
if (canvas_width_samples > one_tenth_of_second) {
return canvas_width_samples;
- }
+ }
return one_tenth_of_second;
}
@@ -959,7 +959,7 @@ WaveView::generate_image (boost::shared_ptr<WaveViewThreadRequest> req, bool in_
if (!req->should_stop()) {
/* sample position is canonical here, and we want to generate
- * an image that spans about 3x the canvas width. We get to that
+ * an image that spans about 3x the canvas width. We get to that
* width by using an image sample count of the screen width added
* on each side of the desired image center.
*/
@@ -980,7 +980,7 @@ WaveView::generate_image (boost::shared_ptr<WaveViewThreadRequest> req, bool in_
offset into the Region's **SOURCE**, rather than an offset into
the Region itself.
*/
-
+
framecnt_t peaks_read = _region->read_peaks (peaks.get(), n_peaks,
sample_start, sample_end - sample_start,
req->channel,
@@ -1104,12 +1104,12 @@ WaveView::render (Rect const & area, Cairo::RefPtr<Cairo::Context> context) cons
// cerr << "Image/WV space: " << image_start << " .. " << image_end << endl;
- /* sample coordinates - note, these are not subject to rounding error
+ /* sample coordinates - note, these are not subject to rounding error
*
* "sample_start = N" means "the first sample we need to represent is N
* samples after the first sample of the region"
*/
-
+
framepos_t sample_start = _region_start + (image_start * _samples_per_pixel);
framepos_t sample_end = _region_start + (image_end * _samples_per_pixel);
@@ -1167,13 +1167,13 @@ WaveView::render (Rect const & area, Cairo::RefPtr<Cairo::Context> context) cons
}
/* compute the first pixel of the image that should be used when we
- * render the specified range.
+ * render the specified range.
*/
image_origin_in_self_coordinates = (image_to_draw->start - _region_start) / _samples_per_pixel;
if (_start_shift && (sample_start == _region_start) && (self.x0 == draw.x0)) {
- /* we are going to draw the first pixel for this region, but
+ /* we are going to draw the first pixel for this region, but
we may not want this to overlap a border around the
waveform. If so, _start_shift will be set.
*/
@@ -1843,7 +1843,7 @@ WaveViewCache::cache_flush ()
}
DEBUG_TRACE (DEBUG::WaveView, string_compose ("cache shrunk to %1\n", image_cache_size));
}
-
+
/* Remove from the linear list, even if we didn't find it in
* the actual cache_mao
*/
diff --git a/libs/canvas/xfade_curve.cc b/libs/canvas/xfade_curve.cc
index 5e44d081a8..259b0e6da5 100644
--- a/libs/canvas/xfade_curve.cc
+++ b/libs/canvas/xfade_curve.cc
@@ -287,7 +287,7 @@ XFadeCurve::render (Rect const & area, Cairo::RefPtr<Cairo::Context> context) co
if (IS_START || show_background_fade) {
set_source_rgba (context, IS_START ? _outline_color : outline_shaded);
context->set_line_width (IS_START ? 1.0 : .5);
-
+
context->begin_new_path ();
context->append_path (*path_in);
context->stroke();