Closed homebeaver closed 1 year ago
point/axis reflection (mirroring)
wir haben 3 arten:
siehe https://de.wikipedia.org/wiki/Spiegelung_(Geometrie)#Punktspiegelung
Dazu etwas Theorie:
[ x'] [ m00 m01 m02 ] [ x ] [ m00x + m01y + m02 ]
[ y'] = [ m10 m11 m12 ] [ y ] = [ m10x + m11y + m12 ]
[ 1 ] [ 0 0 1 ] [ 1 ] [ 1 ]
public AffineTransform(float m00,
float m10,
float m01,
float m11,
float m02,
float m12)
// g2d.scale(-1f, -1f); // Punktspiegelung inversion, point reflection: horizontales und vertikales Spiegeln
//axis of reflection
// g2d.scale(-1f, 1f); // vertikal
// g2d.scale(1, -1); // horizontal
zu g2d.scale:
Concatenates the current Graphics2D Transform with a scaling transformation
Subsequent rendering is resized according to the specified scaling factors relative to the previous scaling.
This is equivalent to calling transform(S), where S is an AffineTransform represented by the following matrix:
[ sx 0 0 ]
[ 0 sy 0 ]
[ 0 0 1 ]
fürs Demo eignen sich keine symetrischen icons. Ich nehme die Feder:
die vertikate Spiegelung von align_left
ergibt align_right
:
wie in https://github.com/homebeaver/SwingSet/issues/30#issuecomment-1250104582 beschrieben