19#include <QFontMetrics>
21#include <QPainterPath>
196 p.setCompositionMode(QPainter::CompositionMode_Difference);
220 }
else if (
width == 1) {
261 pen.setStyle(Qt::DashLine);
262 pen.setDashOffset(4);
278 p.setRenderHint(QPainter::Antialiasing);
300 pen.setStyle(Qt::DashLine);
301 pen.setDashOffset(4);
316 p.setRenderHints(QPainter::Antialiasing);
320 path.cubicTo(start_x + dx / 2,
start_y, start_x,
start_y + dy / 2,
340 *
width =
fm->horizontalAdvance(QString::fromUtf8(text));
387 if (
gui()->map_scale != 1.0f &&
gui()->map_font_scale) {
389 if (
qf->pointSize() !=
ssize) {
396 if (
gui()->map_scale != 1.0f &&
gui()->map_font_scale) {
398 if (
qf->pointSize() !=
ssize) {
434 for (
int y = 0;
y <
oh;
y++) {
442 for (
x = 0;
x <
ow; ++
x) {
QRect zealous_crop_rect(QImage &p)
void qtg_get_text_size(int *width, int *height, enum client_font font, const char *text)
void image_copy(QImage *dest, QImage *src, int src_x, int src_y, int dest_x, int dest_y, int width, int height)
void qtg_canvas_fill_sprite_area(struct canvas *pcanvas, struct sprite *psprite, struct color *pcolor, int canvas_x, int canvas_y)
void qtg_canvas_put_text(struct canvas *pcanvas, int canvas_x, int canvas_y, enum client_font font, struct color *pcolor, const char *text)
bool qtg_has_zoom_support()
void qtg_canvas_put_sprite_full(struct canvas *pcanvas, int canvas_x, int canvas_y, struct sprite *sprite)
void qtg_canvas_free(struct canvas *store)
void qtg_canvas_put_curved_line(struct canvas *pcanvas, struct color *pcolor, enum line_type ltype, int start_x, int start_y, int dx, int dy)
void qtg_canvas_put_sprite_full_scaled(struct canvas *pcanvas, int canvas_x, int canvas_y, int canvas_w, int canvas_h, struct sprite *sprite)
void qtg_canvas_put_line(struct canvas *pcanvas, struct color *pcolor, enum line_type ltype, int start_x, int start_y, int dx, int dy)
struct canvas * qtg_canvas_create(int width, int height)
void qtg_canvas_put_sprite(struct canvas *pcanvas, int canvas_x, int canvas_y, struct sprite *sprite, int offset_x, int offset_y, int width, int height)
void qtg_canvas_copy(struct canvas *dest, struct canvas *src, int src_x, int src_y, int dest_x, int dest_y, int width, int height)
void qtg_canvas_put_rectangle(struct canvas *pcanvas, struct color *pcolor, int canvas_x, int canvas_y, int width, int height)
void qtg_canvas_put_sprite_fogged(struct canvas *pcanvas, int canvas_x, int canvas_y, struct sprite *psprite, bool fog, int fog_x, int fog_y)
void pixmap_copy(QPixmap *dest, QPixmap *src, int src_x, int src_y, int dest_x, int dest_y, int width, int height)
void qtg_canvas_set_zoom(struct canvas *store, float zoom)
void qtg_canvas_mapview_init(struct canvas *store)
static QFont * get_font(enum client_font font)
struct canvas int int struct sprite int int int int height
struct canvas int int int int struct sprite *sprite struct canvas struct color * pcolor
struct canvas int int canvas_y
struct canvas int canvas_x
struct canvas int int int canvas_w
struct canvas int int int int canvas_h
struct canvas int int struct sprite int int offset_y
struct canvas int int struct sprite int offset_x
struct canvas int int struct sprite int int int width
static fc_font * instance()
QFont * get_font(QString name)
const char *const city_productions
const char *const city_names
const char *const reqtree_text
struct sprite int int int int struct sprite int int float bool smooth get_sprite_dimensions