|
|
@ -287,15 +287,10 @@ class ImageHelper {
|
|
|
|
SVG svg = SVG.getFromInputStream(is);
|
|
|
|
SVG svg = SVG.getFromInputStream(is);
|
|
|
|
float dw = svg.getDocumentWidth();
|
|
|
|
float dw = svg.getDocumentWidth();
|
|
|
|
float dh = svg.getDocumentHeight();
|
|
|
|
float dh = svg.getDocumentHeight();
|
|
|
|
if (dw <= 0 || dh <= 0) {
|
|
|
|
|
|
|
|
RectF rect = svg.getDocumentViewBox();
|
|
|
|
|
|
|
|
dw = rect.width();
|
|
|
|
|
|
|
|
dh = rect.height();
|
|
|
|
|
|
|
|
if (dw <= 0 || dh <= 0) {
|
|
|
|
if (dw <= 0 || dh <= 0) {
|
|
|
|
dw = scaleToPixels;
|
|
|
|
dw = scaleToPixels;
|
|
|
|
dh = scaleToPixels;
|
|
|
|
dh = scaleToPixels;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int w, h;
|
|
|
|
int w, h;
|
|
|
|
if (dw > scaleToPixels || dh > scaleToPixels) {
|
|
|
|
if (dw > scaleToPixels || dh > scaleToPixels) {
|
|
|
|