Ejemplo n.º 1
0
struct s_object *f_label_new(struct s_object *self, struct s_object *string_content, TTF_Font *font, struct s_object *environment) {
	struct s_label_attributes *attributes = p_label_alloc(self);
	attributes->last_blend = e_drawable_blend_undefined;
	attributes->last_mask_R = 255.0;
	attributes->last_mask_G = 255.0;
	attributes->last_mask_B = 255.0;
	attributes->last_mask_A = 255.0;
	return p_label_set_content(self, string_content, font, environment);
}
Ejemplo n.º 2
0
struct s_object *f_label_new_alignment(struct s_object *self, char *string_content, TTF_Font *font, enum e_label_background_formats format,
        enum e_label_alignments alignment_x, enum e_label_alignments alignment_y, struct s_object *environment) {
    struct s_label_attributes *attributes = p_label_alloc(self);
    attributes->format = format;
    attributes->alignment_x = alignment_x;
    attributes->alignment_y = alignment_y;
    attributes->last_font = font;
    attributes->last_blend = e_drawable_blend_alpha;
    attributes->last_mask_R = 255.0;
    attributes->last_mask_G = 255.0;
    attributes->last_mask_B = 255.0;
    attributes->last_mask_A = 255.0;
    return p_label_set_content_char(self, string_content, font, environment);
}