pod::Prima::types(3)
π NAME π
This is pod::Prima::types(3) from User Contributed Perl Documentation, and it's the page for Prima::types β builtin types. Iconic auxiliary-class energy only, bestie β¨
π DESCRIPTION π
Okay so these are the auxiliary second-citizen classes β the ones that show up as results from Prima methods and get accepted as inputs. Objects made from these classes are usually never created manually, fr fr. Some of the class names start with a lower-case letter to underscore their auxiliary nature. Cute little side-character classes, honestly. π
π Prima::array π
An overloaded C array that you can use transparently like a normal perl array. The catch: it can only hold numbers. The reason Prima::array exists is so Prima methods won't need to do expensive conversions between a perl array of scalars and a C array of integers or floats. Efficiency slay π
new LETTER = [idsS], BUF = undefβ Creates a new C array with the type of either int, double, short, or unsigned short. There are also methodsnew_int,new_double,new_short, andnew_ushortthat do the same.BUF, a normal perl string, can be used to initialize the array, if any (and can be pre-populated withpack()). Otherwise, the array is created empty.is_array SCALARβ Checks whetherSCALARis aPrima::arrayobject.substr OFFSET, LENGTH, REPLACEMENTβ Emulates perl'ssubstrexcept it operates not on characters but on the individual numeric entries of the array. Returns a newPrima::arrayobject.append ARRAYβ Assuming that two arrays have the same type, appends theARRAY's contents to its content.cloneβ Clones the array.
π¦ Prima::matrix π¦
An array of 6 doubles with some helper methods attached. Tiny matrix, big main-character energy. β¨
A,B,C,D,X,Yβ Named accessory properties for the 6 members. The members can just as well be accessed directly with the array syntax.cloneβ Clones the matrix object.identityβ Sets the matrix toPrima::matrix::identity, or(1,0,0,1,0,0).inverse_transform @POINTS | $POINTS_ARRAYβ Applies the inverse matrix transformations to an array or an arrayref of points and returns the result matrix in the same format (i e array for array, ref for ref).new [ @ARRAY ]β Creates a new object and optionally initializes it with@ARRAY.multiply MATRIXβ Multiplies the matrices and stores the result.rotate ANGLEβ Rotates the matrix.scale MX,MYβ Scales the matrix.shear DX,DYβ Shears the matrix.set @ARRAYβ Assigns all the 6 members at once.translate DX,DYβ Translates the matrix.transform @POINTS | $POINTS_ARRAYβ Applies matrix transformations to an array or arrayref of points and returns the result matrix in the same format (i e array for array, ref for ref).
See also: Prima::Matrix.
π Prima::Matrix π
Same as Prima::matrix but explicitly binds to drawable objects so that all changes to the matrix object are immediately reflected in the drawable. It's giving linked-up, live-update realness π
Features all the methods available to Prima::matrix (except apply), plus the ones described below.
new CANVASβ Creates a new matrix object instance.canvas DRAWABLEβ Accesses the associated drawable object.getβ Returns the current matrix.resetβ Sets the matrix toPrima::matrix::identity, or(1,0,0,1,0,0).save, restoreβ Saves and restores the matrix content in the internal stack.
π Prima::rect π
Represents a rectangular object either as a rectangle ( X1,Y1,X2,Y2 ) or a box ( X,Y,WIDTH,HEIGHT ). Geometry but make it cute π¦
boxβ ReturnsX, Y, WIDTH, HEIGHT.cloneβ Clones the object.enlarge Nβ Enlarges the rectangle byN.inclusiveβ Rectangle itself is agnostic of its 2D presentation, but assuming the coordinates are inclusive-exclusive,inclusivereturnsX1,Y1,X2,Y2as the inclusive-inclusive rectangle.intersect RECTβ Intersects with theRECTrectangle and stores the result.is_emptyβ Returns true if the rectangle width and height are zero.is_equal RECTβ Returns true if both rectangles are equal.new () | (WIDTH,HEIGHT) | (X1,Y1,X2,Y2)β Creates a new object assuming the rectangle syntax.new_box X,Y,WIDTH,HEIGHTβ Creates new object assuming the box syntax.originβ ReturnsXandY.shrink Nβ Shrinks the rectangle byN.sizeβ Returns theWIDTHandHEIGHTof the rectangle.union RECTβ Joins the rectangle with theRECTrectangle and stores the result.
π AUTHOR π
Dmitry Karasik, <dmitry@karasik.eu.org>.
πΈ SEE ALSO πΈ
Prima
Later, bestie! This footer tea is from perl v5.42.0, dated 2024-08-20, on pod::Prima::types(3) π«Άβ¨π
π¦ where this page comes from
- opensuse-leap 16.0: perl-Prima 1.74000-bp160.1.13 Β· AGPL-3.0-only AND BSD-2-Clause
- opensuse-leap 16.0: perl-Prima 1.74000-bp160.1.13 Β· AGPL-3.0-only AND BSD-2-Clause
- opensuse-leap 16.0: perl-Prima 1.74000-bp160.1.13 Β· AGPL-3.0-only AND BSD-2-Clause
- opensuse-leap 16.0: perl-Prima 1.74000-bp160.1.13 Β· AGPL-3.0-only AND BSD-2-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms