Engauge Digitizer
2
Loading...
Searching...
No Matches
Grid
GridTriangleFill.h
Go to the documentation of this file.
1
/******************************************************************************************************
2
* (C) 2018 markummitchell@github.com. This file is part of Engauge Digitizer, which is released *
3
* under GNU General Public License version 2 (GPLv2) or (at your option) any later version. See file *
4
* LICENSE or go to gnu.org/licenses for details. Distribution requires prior written permission. *
5
******************************************************************************************************/
6
7
#ifndef GRID_TRIANGLE_FILL_H
8
#define GRID_TRIANGLE_FILL_H
9
10
#include <QPoint>
11
12
class
GridLog
;
13
class
QImage;
14
18
class
GridTriangleFill
19
{
20
public
:
21
GridTriangleFill
();
22
24
void
fill
(
GridLog
&gridLog,
25
QImage &image,
26
const
QPoint &p0,
27
const
QPoint &p1,
28
const
QPoint &p2);
29
30
private
:
31
32
void
drawLine (
GridLog
&gridLog,
33
QImage &image,
34
int
x0,
35
int
x1,
36
int
y);
37
void
flatBottom (
GridLog
&gridLog,
38
QImage &image,
39
const
QPoint &p0,
40
const
QPoint &p1,
41
const
QPoint &p2);
// Assumes p1 and p2 are at bottom at same y level
42
void
flatTop (
GridLog
&gridLog,
43
QImage &image,
44
const
QPoint &p0,
45
const
QPoint &p1,
46
const
QPoint &p2);
// Assumes p0 and p1 are at top at same y level
47
void
sortByAscendingY (QPoint p0In,
48
QPoint p1In,
49
QPoint p2In,
50
QPoint &p0,
51
QPoint &p1,
52
QPoint &p2)
const
;
53
54
QPoint m_p0;
55
QPoint m_p1;
56
QPoint m_p2;
57
};
58
59
#endif
// GRID_TRIANGLE_FILL_H
GridLog
Class that does special logging for GridLog and GridRemoval classes.
Definition
GridLog.h:18
GridTriangleFill::fill
void fill(GridLog &gridLog, QImage &image, const QPoint &p0, const QPoint &p1, const QPoint &p2)
Fill triangle between these three points.
Definition
GridTriangleFill.cpp:57
GridTriangleFill::GridTriangleFill
GridTriangleFill()
Definition
GridTriangleFill.cpp:29
Generated on
for Engauge Digitizer by
1.14.0