Overview

Classes

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

Class ComponentLabel

The label component, used to display text.

Component
Extended by ComponentLabel
Author: Lemmmy
See: Component
Located at ComponentLabel.php
Methods summary
public
# __construct( OsuSignature $signature, integer $x, integer $y, string $text, string $font = ComponentLabel::FONT_REGULAR, string $colour = '#555555', integer $fontSize = 14, integer $textAlignment = Imagick::ALIGN_UNDEFINED, integer $width = -1, integer $height = -1 )

Creates a new Label component.

Creates a new Label component.

Parameters

$signature
The base signature
$x
The X position of this label
$y
The Y position of this label
$text
The text of this label
$font
The font to use for this label; can be a string or the constants defined in ComponentLabel
$colour
The colour of the text of the label
$fontSize
The size of the font of the label
$textAlignment
The text alignment
$width
Width of the label, set to -1 to use the text size, anything bigger can be used to spoof the component system. -2 makes the component sizeless
$height
Height of the label, set to -1 to use the text size, anything bigger can be used to spoof the component system

Overrides

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

Returns

integer
The width of this component. Overridable.

Overrides

Component::getWidth()
public
# getActualWidth( )
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 FONT_DIRECTORY

The directory in which the font files are located.

The directory in which the font files are located.

# 'fonts/'
string FONT_REGULAR

fonts/exo2regular.ttf

fonts/exo2regular.ttf

# 'exo2regular.ttf'
string FONT_MEDIUM

fonts/exo2medium.ttf

fonts/exo2medium.ttf

# 'exo2medium.ttf'
string FONT_BOLD

fonts/exo2bold.ttf

fonts/exo2bold.ttf

# 'exo2bold.ttf'
string FONT_OSU

fonts/osu!font.ttf

fonts/osu!font.ttf

# 'osu!font.ttf'
Properties inherited from Component
$usesSpace, $x, $y
API documentation generated by ApiGen