@@ -61,7 +61,7 @@ bool CLuaVectorGraphicDefs::SetDocument(CClientVectorGraphic* pVectorGraphic, CX
61
61
if (!pVectorGraphic || !pXMLNode || !pXMLNode->IsValid ())
62
62
return false ;
63
63
64
- pVectorGraphic->SetDocument (pXMLNode);
64
+ return pVectorGraphic->SetDocument (pXMLNode);
65
65
}
66
66
67
67
bool CLuaVectorGraphicDefs::LoadFromFile (lua_State* luaVM, CClientVectorGraphic* pVectorGraphic, CScriptFile* pFile, std::string strPath,
@@ -94,6 +94,8 @@ bool CLuaVectorGraphicDefs::LoadFromFile(lua_State* luaVM, CClientVectorGraphic*
94
94
return false ;
95
95
}
96
96
}
97
+
98
+ return true ;
97
99
}
98
100
99
101
bool CLuaVectorGraphicDefs::SetSize (CClientVectorGraphic* pVectorGraphic, CVector2D size)
@@ -276,16 +278,14 @@ CLuaMultiReturn<int, int> CLuaVectorGraphicDefs::SVGGetSize(CClientVectorGraphic
276
278
return {(int )pVectorGraphic->GetRenderItem ()->m_uiSizeX , (int )pVectorGraphic->GetRenderItem ()->m_uiSizeY };
277
279
}
278
280
279
- bool CLuaVectorGraphicDefs::SVGSetSize (CClientVectorGraphic* pVectorGraphic, int width, int height , std::optional<CLuaFunctionRef> luaFunctionRef)
281
+ bool CLuaVectorGraphicDefs::SVGSetSize (CClientVectorGraphic* pVectorGraphic, CVector2D size , std::optional<CLuaFunctionRef> luaFunctionRef)
280
282
{
281
- if (width <= 0 || height <= 0 )
283
+ if (size. fX <= 0 || size. fY <= 0 )
282
284
throw std::invalid_argument (" A vector graphic must be atleast 1x1 in size." );
283
285
284
- if (width > 4096 || height > 4096 )
286
+ if (size. fX > 4096 || size. fY > 4096 )
285
287
throw std::invalid_argument (" A vector graphic cannot exceed 4096x4096 in size." );
286
288
287
- CVector2D size = CVector2D (width, height);
288
-
289
289
if (luaFunctionRef.has_value () && VERIFY_FUNCTION (luaFunctionRef.value ()))
290
290
{
291
291
CLuaFunctionRef funcRef = luaFunctionRef.value ();
0 commit comments