Series of know issues articles are showing known issue itself about Small Basic and it's workaround.  In this article, local means Small Basic IDE environment and remote means internet browser environment with Silverlight add-in.


GraphicsWindow.DrawRectangle() and GraphicsWindow.DrawEllipse() draw shapes GraphicsWindow.PenWidth smaller than original in remote.  Picture 1 shows a rectangle and an ellipse in local.  Picture 2 shows the same result in remote.

Picture 1 - Result in Local

Picture 2 - Result in Remote


To avoid this issue, adjust x, y, width and height as follows.
GraphicsWindow.PenWidth = pw
GraphicsWindow.DrawRectangle(x, y, width, height)

GraphicsWindow.PenWidth = pw
If silverlight Then
  GraphicsWindow.DrawRectangle(x - pw / 2, y - pw / 2, width + pw, height + pw) ' for remote
  GraphicsWindow.DrawRectangle(x, y, width, height) ' for local

Sample Program

See Also

Small Basic: Difference Between Local and Remote