- The problem with CairoWidget was that it did scale a pixmap of ~100x100

with a *factor* of ~640x480. That means ~64*48*10^6*3 bytes = a ~1.1 Gb RAM pixmap.
The problem didn't show in versions of cairo >= 1.2 because it automagically
clips (yeah, cairo programmers *are* smart :-))
It is temporary fixed for the moment, will be made better asap.


git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@892 3ecf2c5c-341e-0410-92b4-d18e462d057c
This commit is contained in:
tchernobog 2006-08-17 17:03:42 +00:00
parent 09ad981251
commit f42eea8514
3 changed files with 18 additions and 3 deletions

View file

@ -46,13 +46,13 @@ SimulationWidget::draw_widget(cairo_t* ctx)
// NOTE: just to try
CairoElements ce(ctx);
Rectangle area = { 30, 30, 100, 100 };
Rectangle area = { 0.3, 0.3, 1.0, 1.0 };
ce.draw_container(area);
Color red = { 1, 0, 0 };
Point center = { 25, 25 };
Point center = { 0.25, 0.25 };
ce.draw_3dsphere(center, 20, red);
ce.draw_3dsphere(center, 0.20, red);
}
@ -63,10 +63,12 @@ SimulationWidget::calc_size(const History& history, size_t& width, size_t& heigh
width = get_allocation().get_width();
height = get_allocation().get_height();
/*
#ifndef NDEBUG
using namespace std;
clog << " [DD] New allocation event on " << hex << this << ": "
<< dec << width << 'x' << height << endl;
#endif
*/
}