summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Caujolle-Bert <f1rmb@users.sourceforge.net>2003-03-08 17:22:16 +0000
committerDaniel Caujolle-Bert <f1rmb@users.sourceforge.net>2003-03-08 17:22:16 +0000
commit8dc8b90edcd9c4d3e0f23af2097ceb524a1dfd56 (patch)
treea4d4609eda80e9cb806317f80bbd02ec46cccd51
parentb73ce148b53dfa4a281380d54bfac200eaca0bcf (diff)
downloadxine-lib-8dc8b90edcd9c4d3e0f23af2097ceb524a1dfd56.tar.gz
xine-lib-8dc8b90edcd9c4d3e0f23af2097ceb524a1dfd56.tar.bz2
Fix (for real) osd_draw_point(). NOTE: osd_render structure changed (point function pointer added)
CVS patchset: 4379 CVS date: 2003/03/08 17:22:16
-rw-r--r--src/xine-engine/osd.c19
-rw-r--r--src/xine-engine/osd.h11
-rw-r--r--src/xine-engine/xine_interface.c4
3 files changed, 29 insertions, 5 deletions
diff --git a/src/xine-engine/osd.c b/src/xine-engine/osd.c
index 54f95617b..ca273bb3e 100644
--- a/src/xine-engine/osd.c
+++ b/src/xine-engine/osd.c
@@ -255,6 +255,24 @@ static void osd_clear (osd_object_t *osd) {
osd->y2 = 0;
}
+/*
+ * Draw a point.
+ */
+
+static void osd_point (osd_object_t *osd, int x, int y, int color) {
+
+#ifdef LOG_DEBUG
+ printf("osd_point %p (%d x %d)\n", osd, x, y);
+#endif
+
+ /* update clipping area */
+ osd->x1 = MIN(osd->x1, x);
+ osd->x2 = MAX(osd->x2, (x + 1));
+ osd->y1 = MIN(osd->y1, y);
+ osd->y2 = MAX(osd->y2, (y + 1));
+
+ *(osd->area + y * osd->width + x) = color;
+}
/*
* Bresenham line implementation on osd object
@@ -897,6 +915,7 @@ osd_renderer_t *osd_renderer_init( video_overlay_instance_t *video_overlay, conf
this->set_position = osd_set_position;
this->set_font = osd_set_font;
this->clear = osd_clear;
+ this->point = osd_point;
this->line = osd_line;
this->filled_rect = osd_filled_rect;
this->render_text = osd_render_text;
diff --git a/src/xine-engine/osd.h b/src/xine-engine/osd.h
index a3e40f821..aa4b36baf 100644
--- a/src/xine-engine/osd.h
+++ b/src/xine-engine/osd.h
@@ -18,7 +18,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
* OSD stuff (text and graphic primitives)
- * $Id: osd.h,v 1.12 2003/02/11 16:42:42 miguelfreitas Exp $
+ * $Id: osd.h,v 1.13 2003/03/08 17:22:16 f1rmb Exp $
*/
#ifndef HAVE_OSD_H
@@ -89,14 +89,19 @@ struct osd_renderer_s {
*/
int (*hide) (osd_object_t *osd, int64_t vpts );
- /*
+ /*
+ * draw point.
+ */
+ void (*point) (osd_object_t *osd, int x, int y, int color);
+
+ /*
* Bresenham line implementation on osd object
*/
void (*line) (osd_object_t *osd,
int x1, int y1, int x2, int y2, int color );
/*
- * filled retangle
+ * filled rectangle
*/
void (*filled_rect) (osd_object_t *osd,
int x1, int y1, int x2, int y2, int color );
diff --git a/src/xine-engine/xine_interface.c b/src/xine-engine/xine_interface.c
index 97a4243e3..bc989efc6 100644
--- a/src/xine-engine/xine_interface.c
+++ b/src/xine-engine/xine_interface.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: xine_interface.c,v 1.43 2003/03/08 12:53:04 f1rmb Exp $
+ * $Id: xine_interface.c,v 1.44 2003/03/08 17:22:16 f1rmb Exp $
*
* convenience/abstraction layer, functions to implement
* libxine's public interface
@@ -536,7 +536,7 @@ xine_osd_t *xine_osd_new(xine_stream_t *stream, int x, int y, int width, int hei
}
void xine_osd_draw_point(xine_osd_t *this, int x, int y, int color) {
- this->osd.area[y * this->osd.width + x] = color;
+ this->osd.renderer->point(&this->osd, x, y, color);
}
void xine_osd_draw_line(xine_osd_t *this, int x1, int y1, int x2, int y2, int color) {