Small Basic Known Issue: 27122 - Shapes.Rotate() Rotates Triangle and Line at Center in Local But at Corner in Remote

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


Phenomenon

Shapes.Rotate() rotates triangle and line at center [*1] in local but at origin defined co-ordinate in remote.  A sample programs CNM748 and KSL776 don't work properly because of this issue.

Following picture shows a rotation of a triangle created as Shapes.AddTriangle(0, 0, 100, 0, 100, 100). In local, this triangle is rotated around red cross (50, 50). But in remote this triangle is rotated around origin (0, 0).

Workaround

Move triangle and line to appropriate position after rotation.

Sample Program

  • Rotate Triangle 0.5 (CNM748-3) - is update version including a workaround of this issue.
  • Rotate Linie 0.3 (KSL776-1) - is update version including a workaround of this issue.

[*1] Rotation center is not always center of triangle or line. Sample programs CNM748-3 and KSL776-1 calculate and show their rotation centers as red crosses.


See Also