hallo wissende,

ich habe in einem QCanvasView ein Bild mit einer ROI. Die ROI hat eine Ellipsenform, kann aber gedreht sein. Nun möchte ich einen Rahmen um diese Ellipse zeichen (kein Rechteck sondern Ellipsenform). Ich mache das bisher so:


Code:
QCanvasPolygon *polygon1 = new QCanvasPolygon(m_canvas);
QPointArray parray(60);

polygon1->setBrush(QBrush(QColor(100,255,0),Qt::Dense6Pattern ));
//polygon1->setPen( QPen(color));

static double t;
static double x, y;

int pntx,pnty,pntcx,pntcy,zaehler;

x = a;
y = 0;
zaehler = 0;

for (int n=0; n<361; n+=6)
{
	t = (double) n * pi / 180.0;
	x = a * cos(t);
	y = b * sin(t);
	Rotate(x, y, phi);
	pntcx = (int) (xs + x + 0.5);
	pntcy = (int) (ys + y + 0.5); // Spiegelung an der Y-Achse
		
                parray[zaehler] = QPoint(pntcx,pntcy);
	zaehler++;
}
polygon1->setPoints(parray);
polygon1->show();
Problem:
Ich möchte einen Rahmen zeichnen. So wie es ich im Moment mache, Qt:Dense6Pattern beim setBrush vom polygon bekomme ich eine gefüllte fläche und man sieht nicht was markiert wurde.

Dachte an:

Code:
polygon1->setBrush(QBrush(QColor(100,255,0),Qt::NoBrush));
polygon1->setPen( QPen(color));
aber das geht nicht. wird garnichts angezeigt.


Hilfe!