Moving a pixmap "sideways"
- From: G Hasse <gh raditex se>
- To: <gtk-app-devel-list gnome org>
- Subject: Moving a pixmap "sideways"
- Date: Mon, 3 Dec 2001 21:21:30 +0000 (GMT)
Hello,
This must be a common question...
I am trying to do a diagram application. Basicaly a
plotter of y values over time.
+-------------------------+
new |. .. |
values | . . . ... ... |
from | . ..... |
left | |
+-------------------------+
-> diagram moving this way
I have made a mixmap and draw on this and
every secund I send an expose event and
make a
gdk_draw_pixmap( widget->window,
widget->style->fg_gc[GTK_WIDGET_STATE ( widget ) ],
pixmap,
event->area.x, event->area.y,
event->area.x, event->area.y,
event->area.width, event->area.height);
Before that i have to repaint the pixmap with new values
for( pixmap with )
{
for ( pixmap hight )
{
translate all pixels;
}
}
This works nice and is flickerfree BUT!!! The performance is
lousy! Is there a way just to move the pixmap (copy it in
the X-server) and just redraw the begining every time?
Any exampel code anyone?
Goran Hasse
----------------------------------------------------------------
Göran Hasse email: gh raditex se Tel: 08-6949270
Raditex AB http://www.raditex.se
Sickla Alle 7, 1tr Mob: 070-5530148
131 34 NACKA, SWEDEN
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]