Class ComponentAvatar
The avatar component. This fetches the avatar from ComponentAvatar::AVATAR_URL
using the user's UID.
If the user does not have an avatar, it will default to a blank #f8f8f8 square.
&opaqueavatar
can be globally set to draw a white background behind the avatar if the avatar is transparent.
&avatarrounding
can be globally set to override the rounding set by the template.
-
Component
-
ComponentAvatar
Methods summary
public
|
#
__construct( OsuSignature $signature, integer $x = 0, integer $y = 0, integer $width = 78, integer $height = 78, integer $rounding = CardRegular::SIG_ROUNDING )
Parameters
- $signature
- The base signature
- $x
- The X position of this avatar
- $y
- The Y position of this avatar
- $width
- The width of this avatar
- $height
- The height of this avatar
- $rounding
- The rounding of this avatar (can be overriden by the user with
&avatarrounding )
Overrides
|
public
integer
|
#
getWidth( )
Returns
integer The width of this component. Overridable.
Overrides
|
public
integer
|
#
getHeight( )
Returns
integer The height of this component. Overridable.
Overrides
|
public
|
#
draw( OsuSignature $signature )
Draws this component to the signature's canvas.
Draws this component to the signature's canvas.
Parameters
- $signature
- The signature to draw to.
Overrides
|