diff options
author | Neil <nyamatongwe@gmail.com> | 2021-05-12 09:13:07 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2021-05-12 09:13:07 +1000 |
commit | 2feaeaf738851055a79ffcfb9027a3637610faca (patch) | |
tree | 6039c295b12073a5269ac667bbb886cf440d737b /src/Geometry.h | |
parent | 5468995af334359c04625dbd374658bbf91b0449 (diff) | |
download | scintilla-mirror-2feaeaf738851055a79ffcfb9027a3637610faca.tar.gz |
Switch caret line background colour to SC_ELEMENT_CARET_LINE_BACK element and
add SetCaretLineLayer.
Older caret line APIs SCI_SETCARETLINEVISIBLE, SCI_SETCARETLINEBACK,
SCI_SETCARETLINEBACKALPHA now discouraged.
Diffstat (limited to 'src/Geometry.h')
-rw-r--r-- | src/Geometry.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Geometry.h b/src/Geometry.h index 01af92969..a6e49ad5b 100644 --- a/src/Geometry.h +++ b/src/Geometry.h @@ -129,6 +129,10 @@ public: return PRectangle(left + delta, top + delta, right - delta, bottom - delta); } + constexpr PRectangle Inset(Point delta) const noexcept { + return PRectangle(left + delta.x, top + delta.y, right - delta.x, bottom - delta.y); + } + constexpr Point Centre() const noexcept { return Point((left + right) / 2, (top + bottom) / 2); } |