An attribute providing hints about rendering tradeoffs for SVG shapes like rect, polygon, line, path, circle, polyline and ellipse
Questions tagged [shape-rendering]
16 questions
14
votes
2 answers
Adjacent svg:polygon edges do not meet
I am drawing a bar chart using polygons next to each other like this:
If you look closely, there are white spaces between each polygon (zoomed):
I am trying to prevent this from happening. I found out SVG shape-rendering attribute and set it to…

ahmet alp balkan
- 42,679
- 38
- 138
- 214
5
votes
1 answer
Libgdx body position and shaperenderer position not the same
i'm fairly new to libgdx in general. Basically I have the ball bouncing world and i am just experimenting with it. Before I had a fixed camera position as such:
http://prntscr.com/567hvo
After I have putted the following line in the render method…

user3650664
- 161
- 1
- 14
2
votes
2 answers
Drawing shapes in Scene2d Actor (IE. Image or ImageTextButton)
I haven't worked with LibGdx in a couple of years, but I remember figuring this out at some point. I'm trying to create a button, and use ShapeRenderer to draw a Rectangle around the edge of the button (to outline it).
So far, I've attempted to…

sngreco
- 1,138
- 11
- 16
2
votes
1 answer
ShapeRenderer camera
I'm working on platformer game (900x700). And I want to render rectangle (enemy) using ShapeRenderer but I don't see the renctangle.
for(GameObject t : enemies){
if(t instanceof Enemy){
…

David
- 3,055
- 4
- 30
- 73
1
vote
1 answer
LibGDX draw shapes in response to click
I'm trying to draw a circle in the application window wherever the user clicks the mouse.
in the below example I draw a circle on the screen at fixed position. That works. Then I try to draw circles based on mouse click coords. The click registers…

ate50eggs
- 444
- 3
- 14
1
vote
1 answer
How to render multiple Shapes in Libgdx?
I created a bunch of rectangles using for loop and then added them to an array list. I taught that the rendering would be similar the way you render userdata from…

Kevin Bryan
- 1,846
- 2
- 22
- 45
1
vote
1 answer
LibGDX shapeRenderer
I am developing my first game in LibGdx using scene2D.How can I render shapes for
checking collision of different shaped entities?Currently I am rendering Rectangle and Circle shapes.But it does not looks proper for my requirements.
Which is the…

Niranjana
- 514
- 5
- 23
1
vote
1 answer
How to get "crispEdges" for SVG text?
Svg shapes other than text are affected by the shape-rendering attribute which can be set to the crispEdges value (https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/shape-rendering). This value seems to turn anti-aliasing off.
But text is…

Daniel
- 3,383
- 4
- 30
- 61
1
vote
1 answer
LibGDX shaperenderer wrong color
I am in trouble setting the color of my rect. The color of my rect is grey with 0.5f alpha or black with 0. How could I set my color?
This is the code :
Gdx.gl.glClearColor(0, 0, 0,…

user4789408
- 1,196
- 3
- 14
- 31
1
vote
2 answers
How can I fill a circle in libgdx?
using the ShapeRenderer class, I can only fill rectangles.
So how can I fill a circle?
and if possible, fill a sector (portion of a circle)?

Hải Phong
- 5,094
- 6
- 31
- 49
0
votes
0 answers
How to scale a circle in Libgdx?
On shapeRenderer, how to scale a circle? I want to squash it in it's Y axis.
Example: unscaled circle to scaled circle in it's y axis image

Camilo Castillon
- 1
- 1
0
votes
0 answers
Edge disregarding shape-rendering attribute on SVG
I am currently developing a web-based application which uses SVG graphics. However, I was shocked to discover that MS Edge does not render the images correctly. Edge seems to ignore the attribute shape-rendering, which is set to crispEdges in order…

Jason Durham
- 25
- 5
0
votes
1 answer
How to handle collision with ShapeRenderer in LibGDX
I'm trying to make a little game for Android with LibGDX and am having a hard time with collision detection.
So, I have two shapes :
The first one is a rectangle (the player)…

Theoker
- 21
- 3
0
votes
1 answer
Polygon shape rendering in LibGdx
I created a rectangle polygon like this:
polyrect=new Polygon(new…

Niranjana
- 514
- 5
- 23
0
votes
2 answers
Flipping a shaperenderer object in libGDX
I am flipping one of the object in my libGDX project. At the same time I want to flip its shape rendering circle also. How can I do it?
here is my code for shaperenderer:
shapeRenderer.setProjectionMatrix(camera.projection);
…

Niranjana
- 514
- 5
- 23