Pixmap circle border doesn't appear in libGDX html project

I'm programming my first project with libGDX and I'm currently trying to draw a transparent circle with an opaque border on top of the background. It's working as desired in the android an the desktop project. The html project, however, doesn't render the border of the circle.

The circle is a texture which is created with a pixmap. As there is no possibility to set the strokewidth for the drawCircle method (why isn't there any?; see http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/graphics/Pixmap.html#drawCircle-int-int-int-), I'm drawing the border as a filledCircle with another circle on top of it:

  1. creating the texture

    Pixmap pixmap = new Pixmap(radius * 2 + 1, radius * 2 + 1, Format.RGBA8888); Pixmap.setBlending(Blending.None); pixmap.setColor(new Color(1,1,1,1)); pixmap.fillCircle(radius, radius, radius); pixmap.setColor(new Color(0, 0, 0, 0.6f); pixmap.fillCircle(radius, radius, radius - borderWidth); texture = new Texture(pixmap); texture.setFilter(TextureFilter.Linear, TextureFilter.Linear); pixmap.dispose();

  2. drawing

    Gdx.gl.glClearColor(0, 0, 0, 1);
    Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT | GL20.GL_DEPTH_BUFFER_BIT  (Gdx.graphics.getBufferFormat().coverageSampling ? GL20.GL_COVERAGE_BUFFER_BIT_NV : 0));
    
    // tell the camera to update its matrices.
    camera.update();
    game.spriteBatch.setProjectionMatrix(camera.combined);
    
    // begin the drawing process
    game.spriteBatch.begin();
    drawBackground();
    
    //circle gets drawn here
    game.spriteBatch.draw(texture, 50, 50);
    
    //end drawing process
    game.spriteBatch.end();
    

Any ideas?

Edit: Tested on Chrome (35.0.1916.153) and Firefox (30.0) on Ubuntu 14.04. Can anybody reproduce this problem?

Answers


Need Your Help

overflow of a table hidden ?

javascript css table overflow

so what im trying to do here is create a table with java script (success) in a div with a max width of 300px

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.