diff options
Diffstat (limited to 'common')
-rw-r--r-- | common/hashlib.h | 4 | ||||
-rw-r--r-- | common/nextpnr_base_types.h | 2 | ||||
-rw-r--r-- | common/svg.cc | 2 |
3 files changed, 5 insertions, 3 deletions
diff --git a/common/hashlib.h b/common/hashlib.h index 70de8c91..2f7357e2 100644 --- a/common/hashlib.h +++ b/common/hashlib.h @@ -28,9 +28,7 @@ const int hashtable_size_factor = 3; // Cantor pairing function for two non-negative integers // https://en.wikipedia.org/wiki/Pairing_function -inline unsigned int mkhash(unsigned int a, unsigned int b) { - return (a*a + 3*a + 2*a*b + b + b*b) / 2; -} +inline unsigned int mkhash(unsigned int a, unsigned int b) { return (a * a + 3 * a + 2 * a * b + b + b * b) / 2; } // traditionally 5381 is used as starting value for the djb2 hash const unsigned int mkhash_init = 5381; diff --git a/common/nextpnr_base_types.h b/common/nextpnr_base_types.h index 2f114bf8..944bf0b8 100644 --- a/common/nextpnr_base_types.h +++ b/common/nextpnr_base_types.h @@ -46,6 +46,8 @@ struct GraphicElement TYPE_BOX, TYPE_CIRCLE, TYPE_LABEL, + TYPE_LOCAL_ARROW, // Located entirely within the cell boundaries, coordinates in the range [0., 1.] + TYPE_LOCAL_LINE, TYPE_MAX } type = TYPE_NONE; diff --git a/common/svg.cc b/common/svg.cc index d2050843..c5e2ea36 100644 --- a/common/svg.cc +++ b/common/svg.cc @@ -57,6 +57,8 @@ struct SVGWriter switch (el.type) { case GraphicElement::TYPE_LINE: case GraphicElement::TYPE_ARROW: + case GraphicElement::TYPE_LOCAL_LINE: + case GraphicElement::TYPE_LOCAL_ARROW: out << stringf("<line x1=\"%f\" y1=\"%f\" x2=\"%f\" y2=\"%f\" stroke=\"%s\"/>", (el.x1 + dxy.x) * scale, (el.y1 + dxy.y) * scale, (el.x2 + dxy.x) * scale, (el.y2 + dxy.y) * scale, get_stroke_colour(el.style)) |