Package limn.graphics
Record Class Shadow
java.lang.Object
java.lang.Record
limn.graphics.Shadow
- Record Components:
offsetX- how far the shadow lies to the right of the shape, in pointsoffsetY- how far below itblur- the width of the soft edge, in points; zero or morecolor- the shadow's colour, its alpha being how dark it is where it is whole
One layer of the shadow a shape casts: the shape's own outline moved by an offset, blurred, in
one colour. What
Canvas.drawShadow(limn.graphics.RoundRect, limn.graphics.Shadow) draws.
The blur is the distance over which the shadow's edge goes from full to nothing, as in a
style sheet's box-shadow; zero is a hard copy of the shape.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfloatblur()Returns the value of theblurrecord component.color()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.floatoffsetX()Returns the value of theoffsetXrecord component.floatoffsetY()Returns the value of theoffsetYrecord component.floatreach()final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Method Details
-
reach
public float reach()- Returns:
- how far past the shape's box this layer can leave ink, on its farthest side: what a widget drawing it adds to the region its repaints damage
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
offsetX
public float offsetX()Returns the value of theoffsetXrecord component.- Returns:
- the value of the
offsetXrecord component
-
offsetY
public float offsetY()Returns the value of theoffsetYrecord component.- Returns:
- the value of the
offsetYrecord component
-
blur
public float blur()Returns the value of theblurrecord component.- Returns:
- the value of the
blurrecord component
-
color
Returns the value of thecolorrecord component.- Returns:
- the value of the
colorrecord component
-