| 1873 | } |
| 1874 | |
| 1875 | void ScriptingObjects::GraphicsObject::fillRoundedRectangle(var area, var cornerData) |
| 1876 | { |
| 1877 | if (cornerData.isObject()) |
| 1878 | { |
| 1879 | auto cs = (float)cornerData["CornerSize"]; |
| 1880 | cs = SANITIZED(cs); |
| 1881 | |
| 1882 | auto newAction = new ScriptedDrawActions::fillRoundedRect(getRectangleFromVar(area), cs); |
| 1883 | auto ra = cornerData["Rounded"]; |
| 1884 | |
| 1885 | if (ra.isArray()) |
| 1886 | { |
| 1887 | newAction->allRounded = false; |
| 1888 | newAction->rounded[0] = ra[0]; |
| 1889 | newAction->rounded[1] = ra[1]; |
| 1890 | newAction->rounded[2] = ra[2]; |
| 1891 | newAction->rounded[3] = ra[3]; |
| 1892 | } |
| 1893 | |
| 1894 | drawActionHandler.addDrawAction(newAction); |
| 1895 | } |
| 1896 | else |
| 1897 | { |
| 1898 | auto cs = (float)cornerData; |
| 1899 | cs = SANITIZED(cs); |
| 1900 | drawActionHandler.addDrawAction(new ScriptedDrawActions::fillRoundedRect(getRectangleFromVar(area), cs)); |
| 1901 | } |
| 1902 | } |
| 1903 | |
| 1904 | void ScriptingObjects::GraphicsObject::drawRoundedRectangle(var area, var cornerData, float borderSize) |
| 1905 | { |
no test coverage detected