[gnome1] GnomeCanvasPolygon question (fwd)



-- 
   .--= ULLA! =---------------------.   `We are not here to give users what
   \     http://cactus.rulez.org     \   they want'  -- RMS, at GUADEC 2001
    `---= cactus cactus rulez org =---'
Sok kicsi sokat kicsinál.

---------- Forwarded message ----------
Date: Mon, 10 Sep 2001 23:32:01 +0200 (CEST)
From: ERDI Gergo <cactus cactus rulez org>
To: gnome-libs-devel gnome org
Subject: [gnome1] GnomeCanvasPolygon question

Hi,

I am having troubles  understanding why the Polygon canvas item seems to
behave undeterministically.
The following two pieces of code (written in C++ but don't let that bother
you) should render two symmetrical triangles:

    Gnome::CanvasPoints up_arrow_points;
    up_arrow_points.push_back (Point (arrow_left,   y1 + 1 + arrow_height));
    up_arrow_points.push_back (Point (arrow_middle, y1 + 1));
    up_arrow_points.push_back (Point (arrow_right,  y1 + 1 + arrow_height));
    *(new Gnome::CanvasPolygon (*group, up_arrow_points))
	<< fill_color (GUIKACHU_FGC);

    Gnome::CanvasPoints dn_arrow_points;
    dn_arrow_points.push_back (Point (arrow_left,   y2 - arrow_height));
    dn_arrow_points.push_back (Point (arrow_middle, y2));
    dn_arrow_points.push_back (Point (arrow_right,  y2 - arrow_height));
    *(new Gnome::CanvasPolygon (*group, dn_arrow_points))
	<< fill_color (GUIKACHU_FGC);

However, up_arrow is rendered as

		   *
		  ***
		 *****

but dn_arrow is rendered as

		******
		 *****
		  ***
		   *

What's up with that?
(this is all happening on a non-AA canvas)

-- 
   .--= ULLA! =---------------------.   `We are not here to give users what
   \     http://cactus.rulez.org     \   they want'  -- RMS, at GUADEC 2001
    `---= cactus cactus rulez org =---'
I'd give my right arm to be ambidextrous.






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]