mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-08-09 06:45:25 -06:00
FIX: [STUDIO-3459,STUDIO-3065] use FromDIP instead of em_unit load svg
Change-Id: I4be0de849ab825011c241d6da932a2574783ed6f
This commit is contained in:
parent
dc8bdb04bb
commit
f381bcd469
2 changed files with 2 additions and 2 deletions
|
@ -372,7 +372,7 @@ wxBitmap* BitmapCache::load_svg(const std::string &bitmap_name, unsigned target_
|
|||
|
||||
std::vector<unsigned char> data(n_pixels * 4, 0);
|
||||
// BBS: support resize by fill border
|
||||
if (scale_in_center > 0) {
|
||||
if (scale_in_center > 0 && scale_in_center < svg_scale) {
|
||||
int w = (int)(image->width * scale_in_center);
|
||||
int h = (int)(image->height * scale_in_center);
|
||||
::nsvgRasterize(rast, image, 0, 0, scale_in_center, data.data() + int(height - h) / 2 * width * 4 + int(width - w) / 2 * 4, w, h, width * 4);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue