Overview

Classes

  • Card
  • CardRegular
  • Component
  • ComponentAvatar
  • ComponentFlag
  • ComponentImage
  • ComponentLabel
  • ComponentXPBar
  • ErrorImage
  • OsuAPI
  • OsuSignature
  • PredefinedColours
  • Signature
  • Template
  • TemplateNormal
  • Utils
  • Overview
  • Class

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
Extended by ComponentAvatar
Author: Lemmmy
See: Component
Located at ComponentAvatar.php
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

Component::__construct()
public integer
# getWidth( )

Returns

integer
The width of this component. Overridable.

Overrides

Component::getWidth()
public integer
# getHeight( )

Returns

integer
The height of this component. Overridable.

Overrides

Component::getHeight()
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

Component::draw()
Constants summary
string AVATAR_URL
# 'https://a.ppy.sh/'
Properties inherited from Component
$usesSpace, $x, $y
API documentation generated by ApiGen