mirror of
https://github.com/fltk/fltk.git
synced 2026-05-21 06:21:26 +08:00
Override virtual function Fl_Image::scale(int,int) for class Fl_SVG_Image.
An SVG image has no intrinsic size, so it makes no sense to prohibit enlarging it beyond an intrinsic size.
This commit is contained in:
@@ -172,6 +172,7 @@ public:
|
||||
Fl_SVG_Image *as_svg_image() override { return this; }
|
||||
const Fl_SVG_Image *as_svg_image() const override { return this; }
|
||||
void normalize() override;
|
||||
void scale(int w, int h, int keep_aspect = 1, int can_expand = 0) override;
|
||||
};
|
||||
|
||||
#endif // FL_SVG_IMAGE_H
|
||||
|
||||
@@ -412,4 +412,9 @@ void Fl_SVG_Image::normalize() {
|
||||
if (!array) resize(w(), h());
|
||||
}
|
||||
|
||||
|
||||
void Fl_SVG_Image::scale(int w, int h, int keep_aspect, int can_expand) {
|
||||
Fl_Image::scale(w, h, keep_aspect, 1);
|
||||
}
|
||||
|
||||
#endif // FLTK_USE_SVG
|
||||
|
||||
Reference in New Issue
Block a user