wxGraphicsMatrix(3erl)

πŸ¦‹ wxGraphicsMatrix(3erl) β€” Erlang Module Definition πŸ¦‹

okay so bestie, this is the manual page for wxGraphicsMatrix, and it’s giving native affine matrix realness. We’re gonna go through every type, every function, every detail β€” no skips, no cap. πŸ’…


✨ NAME ✨

  • wxGraphicsMatrix β€” Functions for wxGraphicsMatrix class

That’s the name, periodt. πŸŽ€

🌸 DESCRIPTION 🌸

A wxGraphicsMatrix is a native representation of an affine matrix. The contents are specific and private to the respective renderer. Instances are ref counted and can therefore be assigned as usual. The only way to get a valid instance is via wxGraphicsContext:createMatrix/2 or wxGraphicsRenderer:createMatrix/2. fr fr, that’s the only way in.

This class is derived (and can use functions) from: wxGraphicsObject

Also, the docs pointer is literally: wxWidgets docs: wxGraphicsMatrix

🧁 DATA TYPES 🧁

wxGraphicsMatrix() = wx:wx_object()

Yep, lowkey that’s the whole type moment. 🫢

πŸ”₯ EXPORTS πŸ”₯

πŸ’« concat(This, T) -> ok

Types:

This = T = wxGraphicsMatrix()

Concatenates the matrix passed with the current matrix.

The effect of the resulting transformation is to first apply the transformation in t to the coordinates and then apply the transformation in the current matrix to the coordinates. order matters, bestie.

πŸ” get(This) -> Result

Types:

Result =
    {A :: number(),
     B :: number(),
     C :: number(),
     D :: number(),
     Tx :: number(),
     Ty :: number()}
This = wxGraphicsMatrix()

Returns the component values of the matrix via the argument pointers. it’s giving six tiny numbers, cute.

πŸ”„ invert(This) -> ok

Types:

This = wxGraphicsMatrix()

Inverts the matrix.

πŸͺž isEqual(This, T) -> boolean()

Types:

This = T = wxGraphicsMatrix()

Returns true if the elements of the transformation matrix are equal.

πŸ†” isIdentity(This) -> boolean()

Types:

This = wxGraphicsMatrix()

Return true if this is the identity matrix. (Yes, β€œReturn,” singular β€” the original is iconic like that.)

πŸŒ€ rotate(This, Angle) -> ok

Types:

This = wxGraphicsMatrix()
Angle = number()

Rotates this matrix clockwise (in radians). radians, not degrees β€” important vibe check.

πŸ“ scale(This, XScale, YScale) -> ok

Types:

This = wxGraphicsMatrix()
XScale = YScale = number()

Scales this matrix.

🚚 translate(This, Dx, Dy) -> ok

Types:

This = wxGraphicsMatrix()
Dx = Dy = number()

Translates this matrix.

πŸŽ›οΈ set(This) -> ok

Types:

This = wxGraphicsMatrix()

This is the no-options set moment. That’s the whole entry. πŸ’€

🎚️ set(This, Options :: [Option]) -> ok

Types:

This = wxGraphicsMatrix()
Option =
    {a, number()} |
    {b, number()} |
    {c, number()} |
    {d, number()} |
    {tx, number()} |
    {ty, number()}

Sets the matrix to the respective values (default values are the identity matrix).

πŸ“ transformPoint(This) -> {X :: number(), Y :: number()}

Types:

This = wxGraphicsMatrix()

Applies this matrix to a point.

πŸ›£οΈ transformDistance(This) -> {Dx :: number(), Dy :: number()}

Types:

This = wxGraphicsMatrix()

Applies this matrix to a distance (ie. performs all transforms except translations). translation is literally not invited, iykyk.


Source/version sign-off, bestie: wxWidgets team. made this page, and it’s rockin’ version wx 2.2.2.1 for wxGraphicsMatrix(3erl). There’s no date on the footer, so that’s the whole cute sign-off β€” mwah πŸ’‹βœ¨ slay.

πŸ“¦ where this page comes from