Search found 34 matches

by Webarion
Tue Feb 24, 2026 10:52 pm
Forum: Coding Questions
Topic: ClipPath() performs low-quality clipping (without anti-aliasing).
Replies: 0
Views: 79

ClipPath() performs low-quality clipping (without anti-aliasing).

Hi, I'm trying to create a shadow for a complex vector RoundBox shape with different corner radii.
There's no issue when the background color of the RoundBox has no transparency.
But I also need to draw semi-transparent shapes, while clipping the shadow shape in the region of the main shape using ...
by Webarion
Fri Feb 13, 2026 2:22 pm
Forum: Bugs - Documentation
Topic: DestroyTrackWindow() in UserGuide code. Pointer type mismatch?
Replies: 3
Views: 1194

Re: DestroyTrackWindow() in UserGuide code. Pointer type mismatch?


You're wrong with your question here.

Source of the code not specified and (after searching for it) the code not copied correctly and completely with structures.

No Bug

Yes, this is a question about the code in the documentation:
https://www.purebasic.com/documentation/reference/ug_pb_any2 ...
by Webarion
Fri Feb 13, 2026 2:25 am
Forum: Bugs - Documentation
Topic: DestroyTrackWindow() in UserGuide code. Pointer type mismatch?
Replies: 3
Views: 1194

DestroyTrackWindow() in UserGuide code. Pointer type mismatch?

In the code:
Procedure.i DestroyTrackWindow(Window.i)
; Remove Window from the ActiveWindows map, release the allocated memory,
; close the window and set the quit flag, if appropriate.
Shared EventQuit, ActiveWindows()
Protected *ThisData.DATEWINDOW <---
...
Perhaps this should be ...
by Webarion
Sat Nov 29, 2025 10:06 pm
Forum: Coding Questions
Topic: Determine the SpiderBasic installation path
Replies: 0
Views: 1625

Determine the SpiderBasic installation path

Hello! To determine the installation path of PureBasic, we have #PB_Compiler_Home .
My question is: in PureBasic, is there any way to determine the installation path of SpiderBasic , other than specifying it manually or looking it up in the registry using the following example:
Procedure.s ...
by Webarion
Sat Oct 11, 2025 11:29 pm
Forum: Feature Requests and Wishlists
Topic: Preventing PB_Event_FirstCustomValue Clashes Between Independent Libraries
Replies: 17
Views: 4727

Re: Preventing PB_Event_FirstCustomValue Clashes Between Independent Libraries


You can use #PB_Event_FirstCustomValue only once. That's clear.

But you can do something like that:

; You can use this in each file:
CompilerIf Not Defined(CustomEvents, #PB_Enumeration)
Enumeration CustomEvents #PB_Event_FirstCustomValue
EndEnumeration
CompilerEndIf

; You can use the ...
by Webarion
Fri Oct 10, 2025 6:20 pm
Forum: Feature Requests and Wishlists
Topic: Preventing PB_Event_FirstCustomValue Clashes Between Independent Libraries
Replies: 17
Views: 4727

Re: Preventing PB_Event_FirstCustomValue Clashes Between Independent Libraries

The issue with needing unique events is that it needs a unified approach. Because different hypothetical libraries assumed they were the only ones running they did not provide a way for other code to know what events were used. They could of provided a parameter to there own routines that ...
by Webarion
Fri Oct 10, 2025 3:20 pm
Forum: Feature Requests and Wishlists
Topic: Preventing PB_Event_FirstCustomValue Clashes Between Independent Libraries
Replies: 17
Views: 4727

Re: Preventing PB_Event_FirstCustomValue Clashes Between Independent Libraries

There must be a reason why this question raises up from time to time by new users (including me some years ago). And also, why after explaining the way it is done now is questioned.

I'm actually a long-time user, though I'm not very active on the forum.

The reason is that this problem still hasn ...
by Webarion
Thu Oct 09, 2025 6:29 pm
Forum: Feature Requests and Wishlists
Topic: Preventing PB_Event_FirstCustomValue Clashes Between Independent Libraries
Replies: 17
Views: 4727

Re: Preventing PB_Event_FirstCustomValue Clashes Between Independent Libraries


Why not just modify each library to use a named enumeration in a common module?

Everything else that had been suggested tries to avoid modifying the libraries to be consistent. I think that is a recipe for disaster. Why not just fix the inconsistencies where they occur?

What catastrophe are ...
by Webarion
Thu Oct 09, 2025 7:01 am
Forum: Feature Requests and Wishlists
Topic: Preventing PB_Event_FirstCustomValue Clashes Between Independent Libraries
Replies: 17
Views: 4727

Re: Preventing PB_Event_FirstCustomValue Clashes Between Independent Libraries

Here's a simple and simplified demonstration that this can be done at the compiler level:
#RegExp = 0

CreateRegularExpression(#RegExp, "\h*(\#?\w+)|(?:\r\n|$)" )

Global NewMap Compile_Constant()

Compile_Constant( LCase("#PB_Event_FirstCustomValue") ) = 65536

Global CompileCode$ = "Enumeration ...
by Webarion
Thu Oct 09, 2025 6:23 am
Forum: Feature Requests and Wishlists
Topic: Preventing PB_Event_FirstCustomValue Clashes Between Independent Libraries
Replies: 17
Views: 4727

Re: Preventing PB_Event_FirstCustomValue Clashes Between Independent Libraries


The compiler would only need to redefine the constant at EndEnumeration so that #PB_Event_FirstCustomValue increments by #PB_Compiler_EnumerationValue it's an easy fix


Enumeration #PB_Event_FirstCustomValue
#Library1_Event1
#Library1_Event2
#Library1_Event3
EndEnumeration

Enumeration #PB ...
by Webarion
Thu Oct 09, 2025 4:11 am
Forum: Feature Requests and Wishlists
Topic: Preventing PB_Event_FirstCustomValue Clashes Between Independent Libraries
Replies: 17
Views: 4727

Re: Preventing PB_Event_FirstCustomValue Clashes Between Independent Libraries


It's how you would do it in the compiler so that the constant increments automatically.
#pb_compiler_Enumeration increments as enums are added so you can do the same to the include files to resolve the issue via find and replace where ever #pb_event_first_customvalue is


#PB_Compiler ...
by Webarion
Thu Oct 09, 2025 1:20 am
Forum: Feature Requests and Wishlists
Topic: Preventing PB_Event_FirstCustomValue Clashes Between Independent Libraries
Replies: 17
Views: 4727

Re: Preventing PB_Event_FirstCustomValue Clashes Between Independent Libraries


there is #PB_Compiler_EnumerationValue so that could be used like this, assuming your compiling the libs or modules


Enumeration #PB_Event_FirstCustomValue ; the first time this combination is called #PB_Event_FirstCustomValue = 65536
#Library1_Event1
#Library1_Event2
#Library1_Event3 ...
by Webarion
Wed Oct 08, 2025 4:14 pm
Forum: Feature Requests and Wishlists
Topic: Preventing PB_Event_FirstCustomValue Clashes Between Independent Libraries
Replies: 17
Views: 4727

Preventing PB_Event_FirstCustomValue Clashes Between Independent Libraries

Hello! Is there any solution to eliminate conflicts between custom events in different independent libraries?

The authors of various libraries cannot know which libraries the final application developer will use in their product. Therefore, using #PB_Event_FirstCustomValue in a library's ...
by Webarion
Sun May 25, 2025 8:27 pm
Forum: Applications - Feedback and Discussion
Topic: Radix Tree algorithm
Replies: 2
Views: 3883

Re: Radix Tree algorithm


Very useful, it's short and readable (except the Russian comments, for me).Somehow the UTF8 BOM is missing in the version that I downloaded directly from github, I had to manually select UTF8 in the IDE, and then to copy & paste the raw version manually into the editor. Because it would be ...
by Webarion
Sat May 17, 2025 9:43 pm
Forum: Applications - Feedback and Discussion
Topic: Radix Tree algorithm
Replies: 2
Views: 3883

Radix Tree algorithm

Once I needed the implementation of the Radix Tree algorithm, but I did not find it under a free license, so I wrote my own option. This is absolutely free, do everything you want with him.
Github link: https://github.com/webarion/RadixTree