Login  Register

[POLYLINE, PDF] 2 Bugs in Api

Next Topic
 
classic Classic list List threaded Threaded
10 messages Options Options
Embed post
Permalink
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

[POLYLINE, PDF] 2 Bugs in Api

emanuel
This post was updated on Apr 03, 2025; 7:49am.
I discovered a bug.

When I draw a polyline and change its width, it becomes invisible.
See the video attached.
simplescreenrecorder-2025-04-01_20.mp4

Oh my god, the script functions entget, entmake, entmod, etc. are taking me months...
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: [POLYLINE] Bug in Api

dxli
I think we should go restore RAII style rendering pen.

We had that in 2.2.1, but removed in master.

RAII is for exception safety as well as proof of correctness.
emanuel wrote
I discovered a bug.

When I draw a polyline and change its width, it becomes invisible.
See the video attached.
simplescreenrecorder-2025-04-01_20.mp4

Oh my god, the script functions entget, entmake, entmod, etc. are taking me months...
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: [POLYLINE, IMAGE] 3 Bugs in Api

emanuel
In reply to this post by emanuel
Unfortunately, we still have two annoying bugs.

When I add an image, it's also invisible.
When I try to add a PDF, LibreCAD crashes ;-(
Watch the video:
simplescreenrecorder-2025-04-02_14.mp4
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: [POLYLINE] Bug in Api

sand1024
In reply to this post by dxli
>I think we should go restore RAII style rendering pen.

Well, I've found it - this issue actually not related to rendering, it's related to earlier incorrect calculation of bounding rect (minV, MaxV for polylin) after editing operation. So polyline becomes outside of the screen bounding box). I'll apply a fix
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: [POLYLINE, IMAGE] 3 Bugs in Api

sand1024
This post was updated on Apr 02, 2025; 6:02pm.
In reply to this post by emanuel
emanuel wrote
When I try to add a PDF, LibreCAD crashes ;-(
add a PDF? Hmm... how and where? Could you please expand on this?

UPD: Oh, noticed this in your video. I suppose we should apply more strict to image format. PDF is definitely is not something correct that is expected there, AFIK pdf is not supported at all ...
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: [POLYLINE, IMAGE] 3 Bugs in Api

emanuel
See the last video above in the attachment.
Command: File->Import->Import Image (PDF selected)
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: [POLYLINE, IMAGE] 3 Bugs in Api

sand1024
In reply to this post by emanuel
emanuel wrote
When I add an image, it's also invisible.
No, it's visible - but, in the draft mode, only boundary box for the image is drawn.

Please try to disable to Draft mode and check again (the button near to the Grid in the toolbar).
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: [POLYLINE, IMAGE] 3 Bugs in Api

sand1024
In reply to this post by emanuel
emanuel wrote
When I draw a polyline and change its width, it becomes invisible.
Yes, it was my fault. Fixed it already and I'll commit the fix with nearest PR.
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: [POLYLINE, IMAGE] 3 Bugs in Api

emanuel
picture is visible now.
pdf still crashes.
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: [POLYLINE, IMAGE] 3 Bugs in Api

dellus
A pdf is not an image file. Primarily it is a vector format, it may contain an image additionally. But it can not be imported into LibreCAD, it's also not in the list of possible image formats to be imported.