Horizon
Loading...
Searching...
No Matches
src
canvas
triangle.hpp
1
#pragma once
2
#include "util/gl_inc.h"
3
#include "color_palette.hpp"
4
#include "common/common.hpp"
5
6
namespace
horizon {
7
class
Triangle
{
8
public
:
9
float
x0;
10
float
y0;
11
float
x1;
12
float
y1;
13
float
x2;
14
float
y2;
15
16
uint8_t color;
17
uint8_t lod;
18
uint8_t color2 = 0;
19
20
Triangle
(
const
Coordf
&p0,
const
Coordf
&p1,
const
Coordf
&p2, ColorP co, uint8_t ilod = 0, uint8_t c2 = 0)
21
: x0(p0.x), y0(p0.y), x1(p1.x), y1(p1.y), x2(p2.x), y2(p2.y), color(
static_cast<
uint8_t
>
(co)), lod(ilod),
22
color2(c2)
23
{
24
}
25
} __attribute__((packed));
26
27
class
TriangleInfo
{
28
public
:
29
enum class
Type : uint8_t { NONE, TEXT, GRAPHICS, PLANE_FILL, KEEPOUT_FILL, PAD };
30
31
TriangleInfo
(Type ty, uint8_t flg) : type(ty), flags(flg)
32
{
33
}
34
Type type;
35
uint8_t flags;
36
37
static
const
int
FLAG_HIDDEN = 1 << 0;
38
static
const
int
FLAG_HIGHLIGHT = 1 << 1;
39
static
const
int
FLAG_BUTT = 1 << 2;
40
static
const
int
FLAG_GLYPH = 1 << 3;
41
static
const
int
FLAG_ARC = 1 << 4;
42
};
43
44
}
// namespace horizon
horizon::Coord< float >
horizon::TriangleInfo
Definition
triangle.hpp:27
horizon::Triangle
Definition
triangle.hpp:7
Generated by
1.9.8