| 1902 | } |
| 1903 | |
| 1904 | void ScriptingObjects::GraphicsObject::drawRoundedRectangle(var area, var cornerData, float borderSize) |
| 1905 | { |
| 1906 | auto bs = SANITIZED(borderSize); |
| 1907 | auto ar = getRectangleFromVar(area); |
| 1908 | |
| 1909 | if (cornerData.isObject()) |
| 1910 | { |
| 1911 | auto cs = (float)cornerData["CornerSize"]; |
| 1912 | cs = SANITIZED(cs); |
| 1913 | |
| 1914 | auto newAction = new ScriptedDrawActions::drawRoundedRectangle(getRectangleFromVar(area), borderSize, cs); |
| 1915 | auto ra = cornerData["Rounded"]; |
| 1916 | |
| 1917 | if (ra.isArray()) |
| 1918 | { |
| 1919 | newAction->allRounded = false; |
| 1920 | newAction->rounded[0] = ra[0]; |
| 1921 | newAction->rounded[1] = ra[1]; |
| 1922 | newAction->rounded[2] = ra[2]; |
| 1923 | newAction->rounded[3] = ra[3]; |
| 1924 | } |
| 1925 | |
| 1926 | drawActionHandler.addDrawAction(newAction); |
| 1927 | } |
| 1928 | else |
| 1929 | { |
| 1930 | auto cs = (float)cornerData; |
| 1931 | cs = SANITIZED(cs); |
| 1932 | drawActionHandler.addDrawAction(new ScriptedDrawActions::drawRoundedRectangle(ar, bs, cs)); |
| 1933 | } |
| 1934 | } |
| 1935 | |
| 1936 | void ScriptingObjects::GraphicsObject::drawHorizontalLine(int y, float x1, float x2) |
| 1937 | { |
no test coverage detected