aboutsummaryrefslogtreecommitdiffstats
path: root/gui/fpgaviewwidget.cc
diff options
context:
space:
mode:
authorSergiusz Bazanski <q3k@q3k.org>2018-07-26 16:39:19 +0100
committerSergiusz Bazanski <q3k@q3k.org>2018-07-26 16:39:19 +0100
commitc37d2baaf647fec35c28a8e639b0d4a74643537d (patch)
tree4423d574599ca2f05ca2facf6a7b7294ec13f1e8 /gui/fpgaviewwidget.cc
parentf1b84fbdc5b1377cc88e56b5e0f95b62a7531a35 (diff)
downloadnextpnr-c37d2baaf647fec35c28a8e639b0d4a74643537d.tar.gz
nextpnr-c37d2baaf647fec35c28a8e639b0d4a74643537d.tar.bz2
nextpnr-c37d2baaf647fec35c28a8e639b0d4a74643537d.zip
common: rename GraphicElement::{style,type} enums, add _MAX members
Diffstat (limited to 'gui/fpgaviewwidget.cc')
-rw-r--r--gui/fpgaviewwidget.cc20
1 files changed, 10 insertions, 10 deletions
diff --git a/gui/fpgaviewwidget.cc b/gui/fpgaviewwidget.cc
index 6637f2b7..e9096bf4 100644
--- a/gui/fpgaviewwidget.cc
+++ b/gui/fpgaviewwidget.cc
@@ -320,7 +320,7 @@ void FPGAViewWidget::drawDecal(LineShaderData &out, const DecalXY &decal)
offsetX = decal.x;
offsetY = decal.y;
- if (el.type == GraphicElement::G_BOX) {
+ if (el.type == GraphicElement::TYPE_BOX) {
auto line = PolyLine(true);
line.point(offsetX + scale * el.x1, offsetY + scale * el.y1);
line.point(offsetX + scale * el.x2, offsetY + scale * el.y1);
@@ -329,7 +329,7 @@ void FPGAViewWidget::drawDecal(LineShaderData &out, const DecalXY &decal)
line.build(out);
}
- if (el.type == GraphicElement::G_LINE || el.type == GraphicElement::G_ARROW) {
+ if (el.type == GraphicElement::TYPE_LINE || el.type == GraphicElement::TYPE_ARROW) {
PolyLine(offsetX + scale * el.x1, offsetY + scale * el.y1, offsetX + scale * el.x2, offsetY + scale * el.y2)
.build(out);
}
@@ -345,16 +345,16 @@ void FPGAViewWidget::drawDecal(LineShaderData out[], const DecalXY &decal)
offsetX = decal.x;
offsetY = decal.y;
- if (el.type == GraphicElement::G_BOX) {
+ if (el.type == GraphicElement::TYPE_BOX) {
auto line = PolyLine(true);
line.point(offsetX + scale * el.x1, offsetY + scale * el.y1);
line.point(offsetX + scale * el.x2, offsetY + scale * el.y1);
line.point(offsetX + scale * el.x2, offsetY + scale * el.y2);
line.point(offsetX + scale * el.x1, offsetY + scale * el.y2);
switch (el.style) {
- case GraphicElement::G_FRAME:
- case GraphicElement::G_INACTIVE:
- case GraphicElement::G_ACTIVE:
+ case GraphicElement::STYLE_FRAME:
+ case GraphicElement::STYLE_INACTIVE:
+ case GraphicElement::STYLE_ACTIVE:
line.build(out[el.style]);
break;
default:
@@ -362,13 +362,13 @@ void FPGAViewWidget::drawDecal(LineShaderData out[], const DecalXY &decal)
}
}
- if (el.type == GraphicElement::G_LINE || el.type == GraphicElement::G_ARROW) {
+ if (el.type == GraphicElement::TYPE_LINE || el.type == GraphicElement::TYPE_ARROW) {
auto line = PolyLine(offsetX + scale * el.x1, offsetY + scale * el.y1, offsetX + scale * el.x2,
offsetY + scale * el.y2);
switch (el.style) {
- case GraphicElement::G_FRAME:
- case GraphicElement::G_INACTIVE:
- case GraphicElement::G_ACTIVE:
+ case GraphicElement::STYLE_FRAME:
+ case GraphicElement::STYLE_INACTIVE:
+ case GraphicElement::STYLE_ACTIVE:
line.build(out[el.style]);
break;
default: