Unexpected result with #PB_2DDrawing_Outlined

Found an issue in SpiderBasic ? Please report it here !
munfraid
Posts: 96
Joined: Sat Mar 24, 2018 1:33 pm

Unexpected result with #PB_2DDrawing_Outlined

Post by munfraid »

In this example right and bottom border are different from left and top. Zoom in to see it clearly.

Code: Select all

OpenWindow(0, 0, 0, 400, 300, "Outline")
CanvasGadget(0, 0, 0, 400, 300)
StartDrawing(CanvasOutput(0))
DrawingMode(#PB_2DDrawing_Outlined)
Box(50, 50, 300, 200)
StopDrawing()
User avatar
Peter
Posts: 930
Joined: Mon Feb 24, 2014 10:17 pm
Location: 127.0.0.1:9080
Contact:

Re: Unexpected result with #PB_2DDrawing_Outlined

Post by Peter »

I'm afraid we'll have to wait quite a long time for bug fixes. :cry:

For this reason I have extracted the box function and adapted it a little. I hope it now meets the requirements (I have little knowledge of the drawing functions).

Code: Select all

! function spider_Box(a, b, d, f, c) {
!   "undefined" === typeof c && (c = spider.drawing.frontColor);
!   var e = spider.drawing.context;
!   if (spider.drawing.mode == 4) {
!     e.beginPath();
!     e.rect(a, b, d, f);
!     e.strokeStyle = spider_helper_ColorToHtml(c);
!     e.stroke();
!   } else {
!     e.fillStyle = spider_helper_ColorToHtml(c);
!     e.fillRect(a, b, d, f);
!   }
! }



OpenWindow(0, 0, 0, 400, 300, "Outline")
CanvasGadget(0, 0, 0, 400, 300)
StartDrawing(CanvasOutput(0))
DrawingMode(#PB_2DDrawing_Outlined)
Box(50, 50, 300, 200)
StopDrawing()
munfraid
Posts: 96
Joined: Sat Mar 24, 2018 1:33 pm

Re: Unexpected result with #PB_2DDrawing_Outlined

Post by munfraid »

Thanks Peter, this will be helpful!
Peter wrote: Fri Aug 20, 2021 9:50 am I'm afraid we'll have to wait quite a long time for bug fixes. :cry:
That's what we've been doing for quite a while. Currently I'm looking for alternatives to SB, which are in active development. For a new project starting in January I will not count on SB, it's too risky. Sad but true.
Post Reply