Record Class DrawStyle
java.lang.Object
java.lang.Record
com.botwithus.bot.api.draw.DrawStyle
- Record Components:
color- packed0xAARRGGBB; seeColorsthickness- stroke width,DrawLimits.MIN_THICKNESStoDrawLimits.MAX_THICKNESSisFilled- fill rather than stroke; meaningful for rect, ellipse and polyisClosed- close the loop back to the first point; meaningful for poly onlyz- draw order, higher in frontttlMs- lifetime in milliseconds, orDrawLimits.TTL_UNTIL_CLEARED
public record DrawStyle(int color, int thickness, boolean isFilled, boolean isClosed, int z, long ttlMs)
extends Record
The presentation half of a draw command — everything that is not geometry.
Built by DrawBuilder; a script rarely constructs one directly.
ttlMs() is always populated and always goes on the wire, so the
lifetime a command actually got is a value you can read back rather than an
invisible producer-side default.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDrawStyle(int color, int thickness, boolean isFilled, boolean isClosed, int z, long ttlMs) Creates an instance of aDrawStylerecord class. -
Method Summary
Modifier and TypeMethodDescriptionintcolor()Returns the value of thecolorrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanisClosed()Returns the value of theisClosedrecord component.booleanisFilled()Returns the value of theisFilledrecord component.intReturns the value of thethicknessrecord component.final StringtoString()Returns a string representation of this record class.longttlMs()Returns the value of thettlMsrecord component.intz()Returns the value of thezrecord component.
-
Field Details
-
DEFAULT
The style a builder starts from: opaque green, hairline, the producer's default TTL.
-
-
Constructor Details
-
DrawStyle
public DrawStyle(int color, int thickness, boolean isFilled, boolean isClosed, int z, long ttlMs) Creates an instance of aDrawStylerecord class.- Parameters:
color- the value for thecolorrecord componentthickness- the value for thethicknessrecord componentisFilled- the value for theisFilledrecord componentisClosed- the value for theisClosedrecord componentz- the value for thezrecord componentttlMs- the value for thettlMsrecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with thecomparemethod from their corresponding wrapper classes. -
color
-
thickness
-
isFilled
-
isClosed
-
z
-
ttlMs
-