should gfx.drawcircle have a
shapematrix.identity();
at the end of the second version?
this is broken with out, and fixed with the extra line.
import haxegon.*;
class Main {
function new(){
}
function drawPerson(px:Float,py:Float,params:Dynamic){
var w:Float = 15*params.weight+10;
var h:Float = 20*params.height+20;
var legr:Float = 3+3*params.weight;
var legheight:Float = 10*params.height+10;
var legoffset:Float = w/2;
var headradius:Float=6;
var armlength = h*1.2;
var armdx = Math.sin(-Math.PI/4)*armlength;
var armdy = Math.cos(Math.PI/4)*armlength;
trace((px-w)+","+(py-legheight-h)+","+(2*w)+","+h);
/* //hair
Gfx.fillcircle(
px,
py-legheight-h-headradius,
headradius+5,Col.BLUE);
Gfx.fillcircle(
px,
py-legheight-h-headradius,
headradius,Col.BLACK);
Gfx.fillbox(
px-headradius-1,
py-legheight-h-headradius,
2*headradius+2,
headradius+1,
Col.BLACK);
should gfx.drawcircle have a shapematrix.identity(); at the end of the second version?
this is broken with out, and fixed with the extra line. import haxegon.*;
_/ //left leg Gfx.drawbox( px-legoffset-legr, py-legheight, legr_2, legheight,Col.BLUE); //right leg Gfx.drawbox( px+legoffset-legr, py-legheight, legr_2, legheight,Col.BLUE); //torso Gfx.drawbox( px-w, py-legheight-h, 2_w, h,Col.BLUE); //head Gfx.drawcircle( px, py-legheight-h-headradius, headradius,Col.BLUE);