Thankyou @miso and @User_Russian,
After many sweary dead-ends I took a different approach. I had to move the code earlier in the program and it worked - after a fashion.
Whenever I tried to create a blank image I got the white background, even though other transparent images are created elsewhere ...
Search found 16 matches
- Fri Aug 15, 2025 5:40 pm
- Forum: Coding Questions
- Topic: Transparent Image has white background
- Replies: 5
- Views: 305
- Thu Aug 14, 2025 8:29 pm
- Forum: Coding Questions
- Topic: Transparent Image has white background
- Replies: 5
- Views: 305
Transparent Image has white background
Does anyone have any idea what could be causing this behaviour ?
I am trying to create a transparent image on which to write some text which can then be turned upside down.
When I added in the text it always appeared on a white background, so I stripped out that part, just leaving the image empty ...
I am trying to create a transparent image on which to write some text which can then be turned upside down.
When I added in the text it always appeared on a white background, so I stripped out that part, just leaving the image empty ...
- Thu Jul 17, 2025 6:57 pm
- Forum: Coding Questions
- Topic: DrawAlphaImage - drawing in wrong order
- Replies: 7
- Views: 391
Re: DrawAlphaImage - drawing in wrong order
IceSoft was kind of right and lead me to the solution.
The code which drew the layers was erroneously called twice. The first time was after drawing the 'top' layer (calque4). Essentially the program is reversing the order of the layers, so it drew the top layer, added it to the background. cleared ...
The code which drew the layers was erroneously called twice. The first time was after drawing the 'top' layer (calque4). Essentially the program is reversing the order of the layers, so it drew the top layer, added it to the background. cleared ...
- Tue Jul 15, 2025 7:38 pm
- Forum: Coding Questions
- Topic: DrawAlphaImage - drawing in wrong order
- Replies: 7
- Views: 391
Re: DrawAlphaImage - drawing in wrong order
Unfortunately I cannot create a small bit of code which does the same.
I did indeed write a small example, but it behaves exactly as it should. The program which it is part of is very large.
I was hoping that at some point someone had come across something similar and had a eureka moment.
I did indeed write a small example, but it behaves exactly as it should. The program which it is part of is very large.
I was hoping that at some point someone had come across something similar and had a eureka moment.
- Tue Jul 15, 2025 6:40 pm
- Forum: Coding Questions
- Topic: DrawAlphaImage - drawing in wrong order
- Replies: 7
- Views: 391
Re: DrawAlphaImage - drawing in wrong order
Your code works correctly for me also.
I don't know if it makes any difference but the 'background' I am merging them onto is another (non.transparent) image, rather than a canvas.
I don't know if it makes any difference but the 'background' I am merging them onto is another (non.transparent) image, rather than a canvas.
- Tue Jul 15, 2025 5:43 pm
- Forum: Coding Questions
- Topic: DrawAlphaImage - drawing in wrong order
- Replies: 7
- Views: 391
DrawAlphaImage - drawing in wrong order
Hi all,
I have created 4 transparent images which need to be layered in a specific order.
When I draw them onto the background using the following code:
DrawAlphaImage(ImageID(#calque1),(188),100)
DrawAlphaImage(ImageID(#calque2),(188),100)
DrawAlphaImage(ImageID(#calque3),(188),100 ...
I have created 4 transparent images which need to be layered in a specific order.
When I draw them onto the background using the following code:
DrawAlphaImage(ImageID(#calque1),(188),100)
DrawAlphaImage(ImageID(#calque2),(188),100)
DrawAlphaImage(ImageID(#calque3),(188),100 ...
- Wed Feb 09, 2022 3:12 pm
- Forum: Coding Questions
- Topic: Change mouse size
- Replies: 3
- Views: 468
Re: Change mouse size
If you are using a Canvas gadget then the #PB_Cursor_Invisible flag can be used to hide the system pointer when it is over the gadget.
Then you could draw a sprite at the mouse co-ordinates.
(See the CanvasGadget example program, although this does use a different system cursor, but the basic ...
Then you could draw a sprite at the mouse co-ordinates.
(See the CanvasGadget example program, although this does use a different system cursor, but the basic ...
- Wed Feb 09, 2022 2:56 pm
- Forum: Coding Questions
- Topic: play movie with vlc
- Replies: 7
- Views: 834
Re: play movie with vlc
The 'RunProgram' command is what you need.
Something of the form:
RunProgram ("vlc"," path to filename ","")
This works as on my Linux setup as is, but you may have to adjust things for another OS.
For example, if VLC is not included in your PATH, you may have to provide the full path to the ...
Something of the form:
RunProgram ("vlc"," path to filename ","")
This works as on my Linux setup as is, but you may have to adjust things for another OS.
For example, if VLC is not included in your PATH, you may have to provide the full path to the ...
- Mon Oct 04, 2021 1:36 pm
- Forum: Coding Questions
- Topic: Calculate first day of last month
- Replies: 15
- Views: 3005
Re: Calculate first day of last month
This should do the trick.
Code: Select all
d = Date(2022,1,15,0,0,0) ; Test with 15 Jan 2022 because we want 1 Dec 2021 returned.
date=Date(Year(d)-Bool(Month(d)=1),Month(d)-1+(12*Bool(Month(d)=1)),1,0,0,0)
Debug FormatDate("%dd/%mm/%yyyy", date)
- Mon Dec 07, 2020 1:50 pm
- Forum: Linux
- Topic: Strange error message when using 'Compile/Run' on Mint 20
- Replies: 2
- Views: 4356
Strange error message when using 'Compile/Run' on Mint 20
I have just switched over from Mint 19 to 20 and, when I click on the 'Compile/Run' button I get the following error message:
13:39:10] [WARNING] GLib-GIO (DEBUG): _g_io_module_get_default: Found default implementation gvfs (GDaemonVfs) for âgio-vfsâ
It doesn't appear to affect the program ...
13:39:10] [WARNING] GLib-GIO (DEBUG): _g_io_module_get_default: Found default implementation gvfs (GDaemonVfs) for âgio-vfsâ
It doesn't appear to affect the program ...
- Fri Sep 25, 2020 4:20 pm
- Forum: Coding Questions
- Topic: Sending commands to external terminal (Linux)
- Replies: 2
- Views: 1138
Re: Sending commands to external terminal (Linux)
Thanks Marc56us for the very fullsome reply.
What I am actually trying to accomplish is significantly more in depth than calculating disk space.(It just seemed like a nice trivial example to be getting on with.)
At least now know why it wasn't working.
I think I shall resort to writing out a shell ...
What I am actually trying to accomplish is significantly more in depth than calculating disk space.(It just seemed like a nice trivial example to be getting on with.)
At least now know why it wasn't working.
I think I shall resort to writing out a shell ...
- Fri Sep 25, 2020 8:28 am
- Forum: Coding Questions
- Topic: Sending commands to external terminal (Linux)
- Replies: 2
- Views: 1138
Sending commands to external terminal (Linux)
I am trying to automate certain tasks from PB, using the native OS terminal, but without success.
As an example:
rp = RunProgram("xterm", "", "", #PB_Program_Open | #PB_Program_Write)
WriteProgramStringN(rp,"df -h")
CloseProgram(rp) I expected this to open the terminal, then write the command 'df ...
As an example:
rp = RunProgram("xterm", "", "", #PB_Program_Open | #PB_Program_Write)
WriteProgramStringN(rp,"df -h")
CloseProgram(rp) I expected this to open the terminal, then write the command 'df ...
- Thu Sep 17, 2020 7:26 pm
- Forum: General Discussion
- Topic: LineXY
- Replies: 38
- Views: 10676
Re: LineXY
I guess everyone's brain just has a preferred way of looking at things.
When using BBC Basic I've always used a function to 'invert' the y coordinate, just because I think of layout that way.
e.g. PLOT 69,xpos%,FN_yinv(pos%)
A minor overhead, but if you're working in interpreted BASIC, you're going ...
When using BBC Basic I've always used a function to 'invert' the y coordinate, just because I think of layout that way.
e.g. PLOT 69,xpos%,FN_yinv(pos%)
A minor overhead, but if you're working in interpreted BASIC, you're going ...
- Thu Sep 17, 2020 12:49 pm
- Forum: General Discussion
- Topic: LineXY
- Replies: 38
- Views: 10676
Re: LineXY
BBC Basic does use 'conventional' coordinates, although it uses 'Graphic Units' in which 1 pixel is equal to 2 g.u. . This of course conflicts with the text coordinate system, unless text was printed at the graphics cursor.
In memory it is stored from the top left corner - getting my head round the ...
In memory it is stored from the top left corner - getting my head round the ...
- Thu Dec 26, 2019 5:02 pm
- Forum: Coding Questions
- Topic: Strange Colour Requester behaviour
- Replies: 2
- Views: 1052
Re: Strange Colour Requester behaviour
Such a silly thing to miss.
Thanks a lot, infratec
Thanks a lot, infratec
