summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2016-12-09 23:27:54 +0100
committerTomaž Vajngerl <quikee@gmail.com>2016-12-14 22:27:18 +0000
commita90dec7c429c76a44ee165df8b2ffdf867cf0b6c (patch)
tree0730d7fe854cffae4d4787cf98f7731a073992c2 /include
parentee0461902fe7ffa23351f5359ae9a3dc8c0bcf0a (diff)
split markers for galaxy theme, when scaling use splitted markers
For markers (resize markers, anchors,...) we contain them all in one image atlas. This was generally done because of resource limitiations in Windows 95/98 which aren't a problem anymore in present systems. This is however problematic in HiDPI as we scale the image and the coordinates of aren't correct anymore. Another problem is that it uses its own cache instead of common cache in ImplImageTree. So this commit extracts all the markers into its own images for galaxy theme and uses them when we scale. In the future when we extracted all the markers to its own images for all icon themes we can remvoe the old code with the image atlas. Change-Id: Ibee181b529d30e20050df8cd396d338bd53532c0 (cherry picked from commit 681c2c3f59863d1f2d0123a92ee63baf84e18dfc) Reviewed-on: https://gerrit.libreoffice.org/31960 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'include')
-rw-r--r--include/svx/svdhdl.hxx16
-rw-r--r--include/svx/svdstr.hrc94
-rw-r--r--include/vcl/BitmapTools.hxx11
3 files changed, 105 insertions, 16 deletions
diff --git a/include/svx/svdhdl.hxx b/include/svx/svdhdl.hxx
index f5c6d34d5a8e..5725be135390 100644
--- a/include/svx/svdhdl.hxx
+++ b/include/svx/svdhdl.hxx
@@ -84,12 +84,12 @@ enum class SdrHdlKind
enum class BitmapColorIndex
{
- LightGreen,
- Cyan,
- LightCyan,
- Red,
- LightRed,
- Yellow
+ LightGreen = 0,
+ Cyan = 1,
+ LightCyan = 2,
+ Red = 3,
+ LightRed = 4,
+ Yellow = 5,
};
@@ -133,8 +133,6 @@ class SVX_DLLPUBLIC SdrHdl
friend class SdrMarkView; // for the access to nObjHdlNum
friend class SdrHdlList;
- static BitmapEx ImpGetBitmapEx(BitmapMarkerKind eKindOfMarker, sal_uInt16 nInd);
-
protected:
SdrObject* pObj; // does handle belong to an object?
SdrPageView* pPV; // does handle belong to an object in certain pageview?
@@ -233,7 +231,7 @@ public:
visualisation during mouse over it must override this method and call Touch(). */
virtual void onMouseLeave();
- static BitmapEx createGluePointBitmap() { return ImpGetBitmapEx(BitmapMarkerKind::Glue_Deselected, 0); }
+ static BitmapEx createGluePointBitmap();
};
diff --git a/include/svx/svdstr.hrc b/include/svx/svdstr.hrc
index 2a7e16da0fe2..377c68e19d95 100644
--- a/include/svx/svdstr.hrc
+++ b/include/svx/svdstr.hrc
@@ -709,5 +709,99 @@
#define SIP_SA_CROP_MARKERS (SIP_Begin + 276)
#define STR_TABLE_DELETE_CELL_CONTENTS (SIP_Begin + 277)
+#define BMP_MARKER_RECT7_1 (SIP_Begin + 278)
+#define BMP_MARKER_RECT7_2 (SIP_Begin + 279)
+#define BMP_MARKER_RECT7_3 (SIP_Begin + 280)
+#define BMP_MARKER_RECT7_4 (SIP_Begin + 281)
+#define BMP_MARKER_RECT7_5 (SIP_Begin + 282)
+#define BMP_MARKER_RECT7_6 (SIP_Begin + 283)
+#define BMP_MARKER_RECT9_1 (SIP_Begin + 284)
+#define BMP_MARKER_RECT9_2 (SIP_Begin + 285)
+#define BMP_MARKER_RECT9_3 (SIP_Begin + 286)
+#define BMP_MARKER_RECT9_4 (SIP_Begin + 287)
+#define BMP_MARKER_RECT9_5 (SIP_Begin + 288)
+#define BMP_MARKER_RECT9_6 (SIP_Begin + 289)
+#define BMP_MARKER_RECT11_1 (SIP_Begin + 290)
+#define BMP_MARKER_RECT11_2 (SIP_Begin + 291)
+#define BMP_MARKER_RECT11_3 (SIP_Begin + 292)
+#define BMP_MARKER_RECT11_4 (SIP_Begin + 293)
+#define BMP_MARKER_RECT11_5 (SIP_Begin + 294)
+#define BMP_MARKER_RECT11_6 (SIP_Begin + 295)
+#define BMP_MARKER_RECT13_1 (SIP_Begin + 296)
+#define BMP_MARKER_RECT13_2 (SIP_Begin + 297)
+#define BMP_MARKER_RECT13_3 (SIP_Begin + 298)
+#define BMP_MARKER_RECT13_4 (SIP_Begin + 299)
+#define BMP_MARKER_RECT13_5 (SIP_Begin + 300)
+#define BMP_MARKER_RECT13_6 (SIP_Begin + 301)
+
+#define BMP_MARKER_CIRC7_1 (SIP_Begin + 302)
+#define BMP_MARKER_CIRC7_2 (SIP_Begin + 303)
+#define BMP_MARKER_CIRC7_3 (SIP_Begin + 304)
+#define BMP_MARKER_CIRC7_4 (SIP_Begin + 305)
+#define BMP_MARKER_CIRC7_5 (SIP_Begin + 306)
+#define BMP_MARKER_CIRC7_6 (SIP_Begin + 307)
+#define BMP_MARKER_CIRC9_1 (SIP_Begin + 308)
+#define BMP_MARKER_CIRC9_2 (SIP_Begin + 309)
+#define BMP_MARKER_CIRC9_3 (SIP_Begin + 310)
+#define BMP_MARKER_CIRC9_4 (SIP_Begin + 311)
+#define BMP_MARKER_CIRC9_5 (SIP_Begin + 312)
+#define BMP_MARKER_CIRC9_6 (SIP_Begin + 313)
+#define BMP_MARKER_CIRC11_1 (SIP_Begin + 314)
+#define BMP_MARKER_CIRC11_2 (SIP_Begin + 315)
+#define BMP_MARKER_CIRC11_3 (SIP_Begin + 316)
+#define BMP_MARKER_CIRC11_4 (SIP_Begin + 317)
+#define BMP_MARKER_CIRC11_5 (SIP_Begin + 318)
+#define BMP_MARKER_CIRC11_6 (SIP_Begin + 319)
+
+#define BMP_MARKER_ELLI7x9_1 (SIP_Begin + 320)
+#define BMP_MARKER_ELLI7x9_2 (SIP_Begin + 321)
+#define BMP_MARKER_ELLI7x9_3 (SIP_Begin + 322)
+#define BMP_MARKER_ELLI7x9_4 (SIP_Begin + 323)
+#define BMP_MARKER_ELLI7x9_5 (SIP_Begin + 324)
+#define BMP_MARKER_ELLI7x9_6 (SIP_Begin + 325)
+#define BMP_MARKER_ELLI9x11_1 (SIP_Begin + 326)
+#define BMP_MARKER_ELLI9x11_2 (SIP_Begin + 327)
+#define BMP_MARKER_ELLI9x11_3 (SIP_Begin + 328)
+#define BMP_MARKER_ELLI9x11_4 (SIP_Begin + 329)
+#define BMP_MARKER_ELLI9x11_5 (SIP_Begin + 330)
+#define BMP_MARKER_ELLI9x11_6 (SIP_Begin + 331)
+
+#define BMP_MARKER_ELLI9x7_1 (SIP_Begin + 332)
+#define BMP_MARKER_ELLI9x7_2 (SIP_Begin + 333)
+#define BMP_MARKER_ELLI9x7_3 (SIP_Begin + 334)
+#define BMP_MARKER_ELLI9x7_4 (SIP_Begin + 335)
+#define BMP_MARKER_ELLI9x7_5 (SIP_Begin + 336)
+#define BMP_MARKER_ELLI9x7_6 (SIP_Begin + 337)
+#define BMP_MARKER_ELLI11x9_1 (SIP_Begin + 338)
+#define BMP_MARKER_ELLI11x9_2 (SIP_Begin + 339)
+#define BMP_MARKER_ELLI11x9_3 (SIP_Begin + 340)
+#define BMP_MARKER_ELLI11x9_4 (SIP_Begin + 341)
+#define BMP_MARKER_ELLI11x9_5 (SIP_Begin + 342)
+#define BMP_MARKER_ELLI11x9_6 (SIP_Begin + 343)
+
+#define BMP_MARKER_RECTPLUS7_1 (SIP_Begin + 344)
+#define BMP_MARKER_RECTPLUS7_2 (SIP_Begin + 345)
+#define BMP_MARKER_RECTPLUS7_3 (SIP_Begin + 346)
+#define BMP_MARKER_RECTPLUS7_4 (SIP_Begin + 347)
+#define BMP_MARKER_RECTPLUS7_5 (SIP_Begin + 348)
+#define BMP_MARKER_RECTPLUS7_6 (SIP_Begin + 349)
+#define BMP_MARKER_RECTPLUS9_1 (SIP_Begin + 350)
+#define BMP_MARKER_RECTPLUS9_2 (SIP_Begin + 351)
+#define BMP_MARKER_RECTPLUS9_3 (SIP_Begin + 352)
+#define BMP_MARKER_RECTPLUS9_4 (SIP_Begin + 353)
+#define BMP_MARKER_RECTPLUS9_5 (SIP_Begin + 354)
+#define BMP_MARKER_RECTPLUS9_6 (SIP_Begin + 355)
+#define BMP_MARKER_RECTPLUS11_1 (SIP_Begin + 356)
+#define BMP_MARKER_RECTPLUS11_2 (SIP_Begin + 357)
+#define BMP_MARKER_RECTPLUS11_3 (SIP_Begin + 358)
+#define BMP_MARKER_RECTPLUS11_4 (SIP_Begin + 359)
+#define BMP_MARKER_RECTPLUS11_5 (SIP_Begin + 360)
+#define BMP_MARKER_RECTPLUS11_6 (SIP_Begin + 361)
+
+#define BMP_MARKER_ANCHOR (SIP_Begin + 362)
+#define BMP_MARKER_ANCHOR_PRESSED (SIP_Begin + 363)
+#define BMP_MARKER_CROSS (SIP_Begin + 364)
+#define BMP_MARKER_GLUE_SELECTED (SIP_Begin + 365)
+#define BMP_MARKER_GLUE_UNSELECTED (SIP_Begin + 366)
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/vcl/BitmapTools.hxx b/include/vcl/BitmapTools.hxx
index 8be16886fd96..51ae59a097a8 100644
--- a/include/vcl/BitmapTools.hxx
+++ b/include/vcl/BitmapTools.hxx
@@ -15,19 +15,16 @@
#include <vcl/implimagetree.hxx>
-namespace vcl
-{
+namespace vcl {
+namespace bitmap {
-namespace bitmap
-{
+BitmapEx VCL_DLLPUBLIC loadFromName(const OUString& rFileName, const ImageLoadFlags eFlags = ImageLoadFlags::NONE);
BitmapEx VCL_DLLPUBLIC loadFromResource(const ResId& rResId, const ImageLoadFlags eFlags = ImageLoadFlags::NONE);
void loadFromSvg(SvStream& rStream, const OUString& sPath, BitmapEx& rBitmapEx, double fScaleFactor = 1.0);
-}
-
-}
+}} // end vcl::bitmap
#endif // INCLUDED_VCL_BITMAP_TOOLS_HXX