Questions tagged [drawellipse]
51 questions
10
votes
1 answer
How to draw single-colour Ellipse (no black border) with QPainter
Code for the beginning:
QColor yellow("#f0d048");
Qt::BrushStyle style = Qt::SolidPattern;
QBrush brush(yellow, style);
painter.setBrush(brush);
painter.drawEllipse(10,10,10,10);
Everytime I do this, I get a yellow circle surrounded by a black…

Aragon
- 183
- 2
- 8
8
votes
4 answers
cv::Scalar not displaying expected color
On an image frame, I use
void ellipse(Mat& img, Point center, Size axes, double angle, double startAngle, double endAngle, const Scalar& color, int thickness=1, int lineType=8, int shift=0)
to draw an ellipse and I want to set the ellipse color to…

Protocole
- 1,733
- 11
- 28
- 42
5
votes
1 answer
Transparent Ellipse
How do you draw a transparent ellipse with GDI? I tried SetBkMode() but I still get a white ellipse bk.
case WM_PAINT:
{
hdc = BeginPaint(hwnd, &ps);
SetBkMode(hdc, TRANSPARENT); // doesnt work
Ellipse(hdc, 0,0,500,500);
…

Geore Shg
- 1,299
- 5
- 23
- 38
4
votes
2 answers
Why doesn't drawing an ellipse with Pen::DashPattern set produce the expected result?
I'm trying to (simply) draw some lines rotating along an ellipse path and thought I had a nice easy way of doing it. Unfortunately, my solution seems to have some problems:
void EllipseDisplayControl::OnPaint(PaintEventArgs^ e)
{
Graphics^ gfx =…

Jon Cage
- 36,366
- 38
- 137
- 215
4
votes
2 answers
Making eyeball look at/follow cursor movement (C#)
I'm stuck here. I want to have the eyes drawn while 'looking' at (the angle of) the cursor. Also, it should be contained within the bigger circle/quadrant (just like an eyeball). Sadly, it just won't draw the eye for me at the right position/angle…

carrotcake
- 97
- 1
- 5
4
votes
1 answer
Float parameters instead of int for new Rectangle() c#?
Is it possible to use as parameters float instead of int for the Rectangle class in c#?! Or any way in which I can do this by creating maybe a new class similar to Rectangle that takes as parameters float?
I am trying to use this within the…

Bogdan Goie
- 1,257
- 1
- 13
- 21
3
votes
3 answers
Ellipse representing horizontal and vertical error bars with R
In R, how to use ellipses to represent error bars (standard deviation) for x and y variables if only summary data, i.e. mean and SD for different data sets, are available. Any feedback is appreciated.

peanut
- 33
- 4
3
votes
1 answer
How to detect ellipse and remove outliers in image using opencv Python
I'm trying to extract the dots that form an ellipse then draw it . But because of some points that can be considered as outliers, I got an invalid mask of ellipse. Like this:
Here is the code that I'm executing, but it always selects the…

ELOUTMADI
- 59
- 1
- 6
3
votes
1 answer
Drawing points of handwritten stroke using DrawEllipse (GDI+)
I'm working on an application that draws handwritten strokes. Strokes are internally stored as vectors of points and they can be transformed into std::vector. Points are so close to each other, that simple drawing of each point…

LihO
- 41,190
- 11
- 99
- 167
2
votes
2 answers
How to draw circles faster on windows form?
I need to draw small circles at given X,Y coordinates but could be as high as 6000 circles on a panel on a window. How it is very slow and takes about 2 to 3 seconds for 5000 circles.
How could I draw this faster?
private void drawBGA_Pins(BGAmap…

PCG
- 2,049
- 5
- 24
- 42
2
votes
2 answers
How to convert ellipsoid to mesh3d in R?
I use the ellipsoidhull method from cluster package to obtain the minimum volume enclosing ellipsoid (mvee) from a set of points. This method returns an object of class ellipsoid. I need to plot the generated ellipsoid. I tried to use the wire3d…

m.taheri
- 309
- 3
- 21
2
votes
1 answer
Detecting an ellipse in a glaucoma photo
For glaucoma diagnosis it is common to determine a "cup to disk ratio" which compares the diameter of the optic disk (VDD) and optic cup (VCD). The optical disk is visible as a circular red feature (red channel) and the optic cup shows up as a…

indra ginanjar A.T
- 35
- 3
2
votes
1 answer
How can I draw an ellipse based on four rotated and scaled points?
I start with a perfect circle, and then I need to rotate and scale it free without loose the ellipse characteristics:
I would like to know if there is a way to describe a ellipse distorted like that based only in cosines and sines.
I have this…

Carlos Oliveira
- 846
- 10
- 23
2
votes
0 answers
Fill Ellipses with Gradiant Color on Matlab
I have a code on matlab that allows me to plot a series of ellipses, what I am trying to do it to fill each of them with a gradiant color based on 'arcsin(b/a)' The number will go from 0° (straight line) to 90° (pure circle). So each ellipse will…

Dorian Kartalovski
- 213
- 3
- 15
2
votes
1 answer
Superimpose ellipse on a simple X-Y plot in R
I have some data which I have plotted using plot(x,y,..) function. Now I want to superimpose three ellipse on this plot. I know the radius for every axis and I know the center for every ellipse.How can I create such ellipse in R. Not much help is…

Ved Gupta
- 183
- 3
- 15