Freeciv21
Develop your civilization from humble roots to a global empire
canvas.h
Go to the documentation of this file.
1
/**************************************************************************
2
Copyright (c) 1996-2023 Freeciv21 and Freeciv contributors. This file is
3
__ __ part of Freeciv21. Freeciv21 is free software: you can
4
/ \\..// \ redistribute it and/or modify it under the terms of the GNU
5
( oo ) General Public License as published by the Free Software
6
\__/ Foundation, either version 3 of the License, or (at your
7
option) any later version. You should have received
8
a copy of the GNU General Public License along with Freeciv21. If not,
9
see https://www.gnu.org/licenses/.
10
**************************************************************************/
11
12
#pragma once
13
#include "
support.h
"
14
// Qt
15
#include <QImage>
16
#include <QPixmap>
17
18
// Text drawing functions
19
enum
client_font
{
20
FONT_CITY_NAME
,
21
FONT_CITY_PROD
,
22
FONT_REQTREE_TEXT
,
23
FONT_COUNT
24
};
25
26
void
pixmap_copy
(QPixmap *dest,
const
QPixmap *src,
int
src_x,
int
src_y,
27
int
dest_x,
int
dest_y,
int
width,
int
height);
28
QRect
zealous_crop_rect
(QImage &p);
29
QFont
get_font
(
client_font
font);
30
QPixmap
crop_sprite
(
const
QPixmap *sprite);
zealous_crop_rect
QRect zealous_crop_rect(QImage &p)
Return rectangle containing pure image (crops transparency)
Definition:
canvas.cpp:81
pixmap_copy
void pixmap_copy(QPixmap *dest, const QPixmap *src, int src_x, int src_y, int dest_x, int dest_y, int width, int height)
/ \ *********** / _ \ | / \ | Copyright (c) 1996-2023 Freeciv21 and || || _______ Freeciv contributor...
Definition:
canvas.cpp:38
get_font
QFont get_font(client_font font)
Returns given font.
Definition:
canvas.cpp:57
client_font
client_font
Definition:
canvas.h:19
FONT_CITY_PROD
@ FONT_CITY_PROD
Definition:
canvas.h:21
FONT_REQTREE_TEXT
@ FONT_REQTREE_TEXT
Definition:
canvas.h:22
FONT_COUNT
@ FONT_COUNT
Definition:
canvas.h:23
FONT_CITY_NAME
@ FONT_CITY_NAME
Definition:
canvas.h:20
crop_sprite
QPixmap crop_sprite(const QPixmap *sprite)
Helper function to crop a sprite.
Definition:
canvas.cpp:115
support.h
client
canvas.h
Generated by
1.9.1