android - drawTextOnPath drawing text round a circle using hoffset? -


the following code should draw text 0 - 23 around circle, in clock face. done setting hoffet parameter drawtextonpath. works top half of circle, why this, bug. in fact prints 0 - 12 around circle 2 of twelve missing.

path circle = new path(); circle.addcircle(0, 0, (float) radius, direction.cw); shape   shape2 = new pathshape(circle, 1, 1); shape2.resize(1, 1); // have call sets scaling shape2.draw(canvas, timeframepaint);  (int hour=0; hour < 24; ++hour) {     // text     drawhour(canvas, hour,  radius, textpaint, circle); }  public void drawhour(canvas canvas, int hour, double radius,                  paint paint, path path) {         logger.getanonymouslogger().info(string.valueof(hour));     float hoffset =  (float) (hour * radius * constants.tau / 24);     final float voffset = 0;     canvas.drawtextonpath(string.valueof(hour), path, hoffset, voffset, paint); } 

it appears bug after doing testing , looking @ sdk source code. wrong don't see how it's useful design.


Comments

Popular posts from this blog

c++ - Is it possible to compile a VST on linux? -

java - Output of Eclipse is rubbish -

jquery - Confused with JSON data and normal data in Django ajax request -