-
-
Notifications
You must be signed in to change notification settings - Fork 483
Closed
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomers
Description
Describe the bug
If you change the size of the SVG to float, the svgSetSize
function returns false and the SVG image becomes invisible. In addition, the svgGetSize
function returns the new size (even though svgSetSize returned false)
local svg = svgCreate(50.48777777777, 25, 'test.svg');
print(svg);
local w,h = svgGetSize(svg);
print(w,h); -- 50, 25
local b = svgSetSize(svg, 87.6666666, 25);
print(b); -- false
local w,h = svgGetSize(svg);
print(w,h); -- 87,25
Example code
local svg = svgCreate(50.48777777777, 25, 'test.svg');
print(svg);
local w,h = svgGetSize(svg);
print(w,h); -- 50, 25
addCommandHandler('svgsize', function()
local b = svgSetSize(svg, 87.6666666, 25);
print(b); -- false
local w,h = svgGetSize(svg);
print(w,h); -- 87,25
end);
addEventHandler('onClientRender', root, function()
local w,h = svgGetSize(svg);
dxDrawImage(300, 300, w,h,svg);
end);
Steps to reproduce
- Create an SVG with float size (the size will be rounded to the floor and the SVG will render correctly)
- Set the SVG size to another float number (returns false)
- svgGetSize returns the new size (rounded to the floor) sets by svgSetSize (which returned false)
- SVG after "resizing" is not rendered correctly, it is invisible
Version
Multi Theft Auto v1.6-release-22377
Additional context
No response
Relevant log output
No response
Security Policy
- I have read and understood the Security Policy and this issue is not security related.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomers