KarthikeyanKumar / catalano-framework

Automatically exported from code.google.com/p/catalano-framework
0 stars 0 forks source link

DrawLine inverts X and Y coordinates #3

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Sample code (Android):
    FastGraphics graph = new FastGraphics(image);
    graph.setColor(180, 255, 50);
    graph.DrawLine(new IntPoint(10, 10), new IntPoint(10, 110));
    _imgView.setImageBitmap(image.toBitmap());

The above code should draw a vertical line but an horizontal one is draw 
instead (IntPoint(x, y))

Catalano Framework: 1.4
Android 4.4

Original issue reported on code.google.com by claudio....@spot.it on 28 May 2015 at 10:22

GoogleCodeExporter commented 8 years ago
I think there are some major issues in the pixel management and this could be 
related to this bug; if I call the DrawCircle this way:
   _graph.DrawCircle(new IntPoint(269, 15), 5)

I got this exception:
   java.lang.ArrayIndexOutOfBoundsException: length=76800; index=87695
            at Catalano.Imaging.FastBitmap.setRGB(FastBitmap.java:438)
            at Catalano.Imaging.FastGraphics.DrawCircle(FastGraphics.java:97)
            at Catalano.Imaging.FastGraphics.DrawCircle(FastGraphics.java:81)

The frame size is:
    width = 320
    heigth = 240

Original comment by claudio....@spot.it on 29 May 2015 at 3:31