From a5ab79c3d13322174c45fc65a56ee370fc9221d8 Mon Sep 17 00:00:00 2001 From: Mark Oates Date: Sun, 1 Jan 2017 00:57:23 -0500 Subject: [PATCH] Add a draw_raw() function for BitmapObject --- include/allegro_flare/objects/bitmap_object.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/include/allegro_flare/objects/bitmap_object.h b/include/allegro_flare/objects/bitmap_object.h index b8e0c9957..4eed3b0f0 100644 --- a/include/allegro_flare/objects/bitmap_object.h +++ b/include/allegro_flare/objects/bitmap_object.h @@ -71,14 +71,19 @@ class BitmapObject : public object2d } return *this; } - inline BitmapObject &draw() + inline BitmapObject &draw_raw() { - if (_placement) _placement->start_transform(); if (_bitmap) { if (_appearance) al_draw_tinted_bitmap(_bitmap, color::color(_appearance->color, _appearance->opacity), 0, 0, _flags); else al_draw_bitmap(_bitmap, 0, 0, _flags); } + return *this; + } + inline BitmapObject &draw() + { + if (_placement) _placement->start_transform(); + draw_raw(); if (_placement) _placement->restore_transform(); return *this; }