I am using Andengine GLES 2.0 anchor center branch and I am trying to draw a filled in circle. I tried using the Ellipse class it comes with but all I can get is an outline of a circle not a filled in one like I want. I looked around and all I could find were places showing how to draw an outline so this must be a simple thing. So how can I draw a filled in circle with Andengine GLES 2.0 anchor center?
To make a filled circle/ellipse just go
mEllipse.setDrawMode(DrawMode.TRIANGLE_FAN);
Related
How can I draw custom texture/material inside a defined polygon (defined by 3 or 4 or more points)?
I found this: How to draw a polygon with Sceneform, ARCore?
It's a good start. But it's only for 3 points. What if the user adds 4th point? I tried to update the code but it always draw texture as a triangle.
Next, I found this: Sceneform applying textures to triangle seamlessly (it's similar problem to mine)
I want to achieve something like this:
I'm using SceneView in my app https://github.com/SceneView/sceneform-android
Also, it's possible to rotate and zoom in/out the texture?
Thanks for the info!
The problem is to make a circle which has more then one semi circles and having some text on that emi circle depends upon my text input array. how to make this in canvas.
You can use great MPAndroidChart library.
It supports circle graphs.
I am using AndEngine GLES2 anchor center. I am trying to create a simple Polygon without using any physics engine (because i don't need physics). However, I can't find how to do this. I did find some extensions for GLES2 (https://github.com/recastrodiaz/AndEngine) but these are not supported by the anchor center branch.
This seems like a very basic thing that should be possible. Anybody that can tell me how to draw a simple polygon in AndEngine?
I decided it was a better idea to just create a rectangle (for registering the touch events) and just add a sprite (which was a polygon) to this rectangle. It did not provide me any benefit by creating a touch area that was exactly the size and shape of the sprite, hence this method is the right solution for me. This would be a different story if I used physics, but I am not.
If I select shapes like Triangle, Rectangle, Polygon, Curve etc then it must be able to draw specific selected shapes. Like Paint (this is an application offered by Microsoft for creating shapes and sketches). In Android, I have to select the shapes and should be able to draw like a Free hand drawing but it completely should be done it in code wise.
Same: I have to draw either directly select the triangle shape from the options given, or can draw a triangle of any base and height from scratch.
How could I do this in Android application?
You can use OpenGL ES
Open this link
Hope it will useful
So I'd like to be able to draw a circle where I can specify the amount of circle drawn as shown in the following diagram.
AS an opengl newbie I'm not really sure how to approach this.. I've previously drawn full circles using GL_TRIANGLE_FAN
You already know how to draw a circle using a triangle fan. Now you just have to calculate the angles of the cutoff corners, use those as the beginning and end of the arc and place the hub of the triangle fan at the middle of the cutoff edge.
you could use a glScissor test to cut off the parts of the circle that you don't want.
http://www.khronos.org/opengles/sdk/1.1/docs/man/glScissor.xml