Matrix

  • Antworten:0
Mac Systems
  • Forum-Beiträge: 1.727

14.05.2010, 14:20:01 via Website

Irgendwie verstehe ich nicht wie man die Klasse Matrix benutzt, evtl hat jemand mal einige bspiele ?

1final Matrix matrix = new Matrix();
2 matrix.reset();
3 matrix.postTranslate(getWidth()/2,getHeight()/2);
4 canvas.setMatrix(matrix);
5 OvalShape oval = new OvalShape();
6 oval.resize(100, 100);
7 shape.draw(canvas,overlayPaint);


Ich versuche ein Shape mit der Grösse 100 zu zeichen (im Center), mein Canvas ist 200x200 pixel, sehen tue ich garnix. Wieso ?
Ich habe vorher keine anderen Transformationen durchgeführt!


thx,
Mac

Windmate HD, See you @ IO 14 , Worked on Wundercar, Glass V3, LG G Watch, Moto 360, Android TV

Antworten