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
This commit is contained in:
Tomaž Vajngerl
2016-12-09 23:27:54 +01:00
parent 9b71cb7371
commit 681c2c3f59
95 changed files with 336 additions and 27 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 416 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 437 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 127 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 128 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 128 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 129 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 129 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 130 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 112 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 112 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 112 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 110 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 110 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 114 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 120 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 120 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 120 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 121 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 121 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 123 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 342 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 135 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 147 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 136 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 146 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 134 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 135 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 120 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 119 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 119 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 120 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 120 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 121 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 123 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 123 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 123 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 124 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 124 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 124 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 127 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 136 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 125 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 136 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 127 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 125 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 138 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 151 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 104 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 104 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 104 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 105 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 104 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 105 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 105 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 104 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 105 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 105 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 105 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 101 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 101 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 101 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 102 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 102 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 102 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 104 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 102 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 103 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 103 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 103 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 134 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 137 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 126 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 128 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 127 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 126 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 114 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 115 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 114 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 116 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 115 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 115 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 130 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 135 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 121 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 124 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 123 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 121 B

View File

@@ -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();
};

View File

@@ -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: */

View File

@@ -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

View File

@@ -57,6 +57,7 @@
#include <vcl/svapp.hxx>
#include <svx/sdr/overlay/overlaypolypolygon.hxx>
#include <vcl/lazydelete.hxx>
#include <vcl/BitmapTools.hxx>
#include <basegfx/polygon/b2dpolygontools.hxx>
#include <drawinglayer/primitive2d/polypolygonprimitive2d.hxx>
@@ -68,6 +69,7 @@
#include <memory>
// #i15222#
// Due to the resource problems in Win95/98 with bitmap resources I
// will change this handle bitmap providing class. Old version was splitting
@@ -673,12 +675,124 @@ BitmapMarkerKind SdrHdl::GetNextBigger(BitmapMarkerKind eKnd)
return eRetval;
}
BitmapEx SdrHdl::ImpGetBitmapEx( BitmapMarkerKind eKindOfMarker, sal_uInt16 nInd)
namespace
{
static vcl::DeleteOnDeinit< SdrHdlBitmapSet > aModernSet(new SdrHdlBitmapSet);
return aModernSet.get()->GetBitmapEx(eKindOfMarker, nInd);
OUString appendMarkerName(BitmapMarkerKind eKindOfMarker)
{
switch(eKindOfMarker)
{
case BitmapMarkerKind::Rect_7x7:
return "rect7";
case BitmapMarkerKind::Rect_9x9:
return "rect9";
case BitmapMarkerKind::Rect_11x11:
return "rect11";
case BitmapMarkerKind::Rect_13x13:
return "rect13";
case BitmapMarkerKind::Circ_7x7:
case BitmapMarkerKind::Customshape_7x7:
return "circ7";
case BitmapMarkerKind::Circ_9x9:
case BitmapMarkerKind::Customshape_9x9:
return "circ9";
case BitmapMarkerKind::Circ_11x11:
case BitmapMarkerKind::Customshape_11x11:
return "circ11";
case BitmapMarkerKind::Elli_7x9:
return "elli7x9";
case BitmapMarkerKind::Elli_9x11:
return "elli9x11";
case BitmapMarkerKind::Elli_9x7:
return "elli9x7";
case BitmapMarkerKind::Elli_11x9:
return "elli11x9";
case BitmapMarkerKind::RectPlus_7x7:
return "rectplus7";
case BitmapMarkerKind::RectPlus_9x9:
return "rectplus9";
case BitmapMarkerKind::RectPlus_11x11:
return "rectplus11";
case BitmapMarkerKind::Crosshair:
return "cross";
case BitmapMarkerKind::Anchor:
case BitmapMarkerKind::AnchorTR:
return "anchor";
case BitmapMarkerKind::AnchorPressed:
case BitmapMarkerKind::AnchorPressedTR:
return "anchor-pressed";
case BitmapMarkerKind::Glue:
return "glue-selected";
case BitmapMarkerKind::Glue_Deselected:
return "glue-unselected";
default:
break;
}
return "";
}
OUString appendMarkerColor(BitmapColorIndex eIndex)
{
switch(eIndex)
{
case BitmapColorIndex::LightGreen:
return "1";
case BitmapColorIndex::Cyan:
return "2";
case BitmapColorIndex::LightCyan:
return "3";
case BitmapColorIndex::Red:
return "4";
case BitmapColorIndex::LightRed:
return "5";
case BitmapColorIndex::Yellow:
return "6";
default:
break;
}
return "";
}
BitmapEx ImpGetBitmapEx(BitmapMarkerKind eKindOfMarker, BitmapColorIndex eIndex)
{
// use this code path only when we use HiDPI (for now)
if (Application::GetDefaultDevice()->GetDPIScalePercentage() > 100)
{
OUString sMarkerPrefix("svx/res/marker-");
OUString sMarkerName = appendMarkerName(eKindOfMarker);
if (!sMarkerName.isEmpty())
{
BitmapEx aBitmapEx;
if (eKindOfMarker == BitmapMarkerKind::Crosshair
|| eKindOfMarker == BitmapMarkerKind::Anchor
|| eKindOfMarker == BitmapMarkerKind::AnchorTR
|| eKindOfMarker == BitmapMarkerKind::AnchorPressed
|| eKindOfMarker == BitmapMarkerKind::AnchorPressedTR
|| eKindOfMarker == BitmapMarkerKind::Glue
|| eKindOfMarker == BitmapMarkerKind::Glue_Deselected)
{
aBitmapEx = vcl::bitmap::loadFromName(sMarkerPrefix + sMarkerName + ".png");
}
else
{
aBitmapEx = vcl::bitmap::loadFromName(sMarkerPrefix + sMarkerName + "-" + appendMarkerColor(eIndex) + ".png");
}
if (!aBitmapEx.IsEmpty())
return aBitmapEx;
}
}
// if we can't load the marker..
static vcl::DeleteOnDeinit< SdrHdlBitmapSet > aModernSet(new SdrHdlBitmapSet);
return aModernSet.get()->GetBitmapEx(eKindOfMarker, sal_uInt16(eIndex));
}
} // end anonymous namespace
sdr::overlay::OverlayObject* SdrHdl::CreateOverlayObject(
const basegfx::B2DPoint& rPos,
BitmapColorIndex eColIndex, BitmapMarkerKind eKindOfMarker, OutputDevice& /*rOutDev*/, Point aMoveOutsideOffset)
@@ -752,8 +866,8 @@ sdr::overlay::OverlayObject* SdrHdl::CreateOverlayObject(
}
// create animated handle
BitmapEx aBmpEx1 = ImpGetBitmapEx( eKindOfMarker, (sal_uInt16)eColIndex );
BitmapEx aBmpEx2 = ImpGetBitmapEx( eNextBigger, (sal_uInt16)eColIndex );
BitmapEx aBmpEx1 = ImpGetBitmapEx(eKindOfMarker, eColIndex);
BitmapEx aBmpEx2 = ImpGetBitmapEx(eNextBigger, eColIndex);
// #i53216# Use system cursor blink time. Use the unsigned value.
const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
@@ -784,7 +898,7 @@ sdr::overlay::OverlayObject* SdrHdl::CreateOverlayObject(
else
{
// create normal handle: use ImpGetBitmapEx(...) now
BitmapEx aBmpEx = ImpGetBitmapEx(eKindOfMarker, (sal_uInt16)eColIndex);
BitmapEx aBmpEx = ImpGetBitmapEx(eKindOfMarker, eColIndex);
// When the image with handles is not found, the bitmap returned is
// empty. This is a problem when we use LibreOffice as a library
@@ -971,6 +1085,11 @@ void SdrHdl::onMouseLeave()
{
}
BitmapEx SdrHdl::createGluePointBitmap()
{
return ImpGetBitmapEx(BitmapMarkerKind::Glue_Deselected, BitmapColorIndex::LightGreen);
}
SdrHdlColor::SdrHdlColor(const Point& rRef, Color aCol, const Size& rSize, bool bLum)
: SdrHdl(rRef, SdrHdlKind::Color),
aMarkerSize(rSize),

View File

@@ -2678,6 +2678,101 @@ Bitmap SIP_SA_PAGESHADOW35X35
File = "pageshadow35x35.png";
};
Bitmap BMP_MARKER_RECT7_1 { File = "marker-rect7-1.png"; };
Bitmap BMP_MARKER_RECT7_2 { File = "marker-rect7-2.png"; };
Bitmap BMP_MARKER_RECT7_3 { File = "marker-rect7-3.png"; };
Bitmap BMP_MARKER_RECT7_4 { File = "marker-rect7-4.png"; };
Bitmap BMP_MARKER_RECT7_5 { File = "marker-rect7-5.png"; };
Bitmap BMP_MARKER_RECT7_6 { File = "marker-rect7-6.png"; };
Bitmap BMP_MARKER_RECT9_1 { File = "marker-rect9-1.png"; };
Bitmap BMP_MARKER_RECT9_2 { File = "marker-rect9-2.png"; };
Bitmap BMP_MARKER_RECT9_3 { File = "marker-rect9-3.png"; };
Bitmap BMP_MARKER_RECT9_4 { File = "marker-rect9-4.png"; };
Bitmap BMP_MARKER_RECT9_5 { File = "marker-rect9-5.png"; };
Bitmap BMP_MARKER_RECT9_6 { File = "marker-rect9-6.png"; };
Bitmap BMP_MARKER_RECT11_1 { File = "marker-rect11-1.png"; };
Bitmap BMP_MARKER_RECT11_2 { File = "marker-rect11-2.png"; };
Bitmap BMP_MARKER_RECT11_3 { File = "marker-rect11-3.png"; };
Bitmap BMP_MARKER_RECT11_4 { File = "marker-rect11-4.png"; };
Bitmap BMP_MARKER_RECT11_5 { File = "marker-rect11-5.png"; };
Bitmap BMP_MARKER_RECT11_6 { File = "marker-rect11-6.png"; };
Bitmap BMP_MARKER_RECT13_1 { File = "marker-rect13-1.png"; };
Bitmap BMP_MARKER_RECT13_2 { File = "marker-rect13-2.png"; };
Bitmap BMP_MARKER_RECT13_3 { File = "marker-rect13-3.png"; };
Bitmap BMP_MARKER_RECT13_4 { File = "marker-rect13-4.png"; };
Bitmap BMP_MARKER_RECT13_5 { File = "marker-rect13-5.png"; };
Bitmap BMP_MARKER_RECT13_6 { File = "marker-rect13-6.png"; };
Bitmap BMP_MARKER_CIRC7_1 { File = "marker-circ7-1.png"; };
Bitmap BMP_MARKER_CIRC7_2 { File = "marker-circ7-2.png"; };
Bitmap BMP_MARKER_CIRC7_3 { File = "marker-circ7-3.png"; };
Bitmap BMP_MARKER_CIRC7_4 { File = "marker-circ7-4.png"; };
Bitmap BMP_MARKER_CIRC7_5 { File = "marker-circ7-5.png"; };
Bitmap BMP_MARKER_CIRC7_6 { File = "marker-circ7-6.png"; };
Bitmap BMP_MARKER_CIRC9_1 { File = "marker-circ9-1.png"; };
Bitmap BMP_MARKER_CIRC9_2 { File = "marker-circ9-2.png"; };
Bitmap BMP_MARKER_CIRC9_3 { File = "marker-circ9-3.png"; };
Bitmap BMP_MARKER_CIRC9_4 { File = "marker-circ9-4.png"; };
Bitmap BMP_MARKER_CIRC9_5 { File = "marker-circ9-5.png"; };
Bitmap BMP_MARKER_CIRC9_6 { File = "marker-circ9-6.png"; };
Bitmap BMP_MARKER_CIRC11_1 { File = "marker-circ11-1.png"; };
Bitmap BMP_MARKER_CIRC11_2 { File = "marker-circ11-2.png"; };
Bitmap BMP_MARKER_CIRC11_3 { File = "marker-circ11-3.png"; };
Bitmap BMP_MARKER_CIRC11_4 { File = "marker-circ11-4.png"; };
Bitmap BMP_MARKER_CIRC11_5 { File = "marker-circ11-5.png"; };
Bitmap BMP_MARKER_CIRC11_6 { File = "marker-circ11-6.png"; };
Bitmap BMP_MARKER_ELLI7x9_1 { File = "marker-elli7x9-1.png"; };
Bitmap BMP_MARKER_ELLI7x9_2 { File = "marker-elli7x9-2.png"; };
Bitmap BMP_MARKER_ELLI7x9_3 { File = "marker-elli7x9-3.png"; };
Bitmap BMP_MARKER_ELLI7x9_4 { File = "marker-elli7x9-4.png"; };
Bitmap BMP_MARKER_ELLI7x9_5 { File = "marker-elli7x9-5.png"; };
Bitmap BMP_MARKER_ELLI7x9_6 { File = "marker-elli7x9-6.png"; };
Bitmap BMP_MARKER_ELLI9x11_1 { File = "marker-elli9x11-1.png"; };
Bitmap BMP_MARKER_ELLI9x11_2 { File = "marker-elli9x11-2.png"; };
Bitmap BMP_MARKER_ELLI9x11_3 { File = "marker-elli9x11-3.png"; };
Bitmap BMP_MARKER_ELLI9x11_4 { File = "marker-elli9x11-4.png"; };
Bitmap BMP_MARKER_ELLI9x11_5 { File = "marker-elli9x11-5.png"; };
Bitmap BMP_MARKER_ELLI9x11_6 { File = "marker-elli9x11-6.png"; };
Bitmap BMP_MARKER_ELLI9x7_1 { File = "marker-elli9x7-1.png"; };
Bitmap BMP_MARKER_ELLI9x7_2 { File = "marker-elli9x7-2.png"; };
Bitmap BMP_MARKER_ELLI9x7_3 { File = "marker-elli9x7-3.png"; };
Bitmap BMP_MARKER_ELLI9x7_4 { File = "marker-elli9x7-4.png"; };
Bitmap BMP_MARKER_ELLI9x7_5 { File = "marker-elli9x7-5.png"; };
Bitmap BMP_MARKER_ELLI9x7_6 { File = "marker-elli9x7-6.png"; };
Bitmap BMP_MARKER_ELLI11x9_1 { File = "marker-elli11x9-1.png"; };
Bitmap BMP_MARKER_ELLI11x9_2 { File = "marker-elli11x9-2.png"; };
Bitmap BMP_MARKER_ELLI11x9_3 { File = "marker-elli11x9-3.png"; };
Bitmap BMP_MARKER_ELLI11x9_4 { File = "marker-elli11x9-4.png"; };
Bitmap BMP_MARKER_ELLI11x9_5 { File = "marker-elli11x9-5.png"; };
Bitmap BMP_MARKER_ELLI11x9_6 { File = "marker-elli11x9-6.png"; };
Bitmap BMP_MARKER_RECTPLUS7_1 { File = "marker-rectplus7-1.png"; };
Bitmap BMP_MARKER_RECTPLUS7_2 { File = "marker-rectplus7-2.png"; };
Bitmap BMP_MARKER_RECTPLUS7_3 { File = "marker-rectplus7-3.png"; };
Bitmap BMP_MARKER_RECTPLUS7_4 { File = "marker-rectplus7-4.png"; };
Bitmap BMP_MARKER_RECTPLUS7_5 { File = "marker-rectplus7-5.png"; };
Bitmap BMP_MARKER_RECTPLUS7_6 { File = "marker-rectplus7-6.png"; };
Bitmap BMP_MARKER_RECTPLUS9_1 { File = "marker-rectplus9-1.png"; };
Bitmap BMP_MARKER_RECTPLUS9_2 { File = "marker-rectplus9-2.png"; };
Bitmap BMP_MARKER_RECTPLUS9_3 { File = "marker-rectplus9-3.png"; };
Bitmap BMP_MARKER_RECTPLUS9_4 { File = "marker-rectplus9-4.png"; };
Bitmap BMP_MARKER_RECTPLUS9_5 { File = "marker-rectplus9-5.png"; };
Bitmap BMP_MARKER_RECTPLUS9_6 { File = "marker-rectplus9-6.png"; };
Bitmap BMP_MARKER_RECTPLUS11_1 { File = "marker-rectplus11-1.png"; };
Bitmap BMP_MARKER_RECTPLUS11_2 { File = "marker-rectplus11-2.png"; };
Bitmap BMP_MARKER_RECTPLUS11_3 { File = "marker-rectplus11-3.png"; };
Bitmap BMP_MARKER_RECTPLUS11_4 { File = "marker-rectplus11-4.png"; };
Bitmap BMP_MARKER_RECTPLUS11_5 { File = "marker-rectplus11-5.png"; };
Bitmap BMP_MARKER_RECTPLUS11_6 { File = "marker-rectplus11-6.png"; };
Bitmap BMP_MARKER_ANCHOR { File = "marker-anchor.png"; };
Bitmap BMP_MARKER_ANCHOR_PRESSED { File = "marker-anchor-pressed.png"; };
Bitmap BMP_MARKER_CROSS { File = "marker-cross.png"; };
Bitmap BMP_MARKER_GLUE_SELECTED { File = "marker-glue-selected.png"; };
Bitmap BMP_MARKER_GLUE_UNSELECTED { File = "marker-glue-unselected.png"; };
Bitmap SIP_SA_MARKERS
{
File = "markers.png";

View File

@@ -36,10 +36,19 @@ namespace vcl
namespace bitmap
{
BitmapEx loadFromResource(const ResId& rResId, const ImageLoadFlags eFlags)
BitmapEx loadFromName(const OUString& rFileName, const ImageLoadFlags eFlags)
{
BitmapEx aBitmapEx;
OUString aIconTheme = Application::GetSettings().GetStyleSettings().DetermineIconTheme();
ImplImageTree::get().loadImage(rFileName, aIconTheme, aBitmapEx, true, eFlags);
return aBitmapEx;
}
BitmapEx loadFromResource(const ResId& rResId, const ImageLoadFlags eFlags)
{
ResMgr* pResMgr = nullptr;
ResMgr::GetResourceSkipHeader(rResId.SetRT( RSC_BITMAP ), &pResMgr);
@@ -47,11 +56,8 @@ BitmapEx loadFromResource(const ResId& rResId, const ImageLoadFlags eFlags)
pResMgr->ReadLong();
const OUString aFileName(pResMgr->ReadString());
OUString aIconTheme = Application::GetSettings().GetStyleSettings().DetermineIconTheme();
ImplImageTree::get().loadImage(aFileName, aIconTheme, aBitmapEx, true, eFlags);
return aBitmapEx;
return loadFromName(aFileName, eFlags);
}
void loadFromSvg(SvStream& rStream, const OUString& sPath, BitmapEx& rBitmapEx, double fScalingFactor)