Thanks KCC
Previous Posts updated
Merge & Position any no. of Images
Re: Merge & Position any no. of Images
Egypt my love
Re: Merge & Position any no. of Images
Hi!
Edit:
I almost forgot:
#PB_Canvas_Keyboard has also to be added in order get mousewheel working.
At least here.
Maybe a #PB_Canvas_ClipMouse is helpfull?davido wrote:...
2a. The pictures can be lost in all four directions.
...
Edit:
I almost forgot:
#PB_Canvas_Keyboard has also to be added in order get mousewheel working.
At least here.

Re: Merge & Position any no. of Images
Hi Rashad,
For the Added transparency effect as per infratec suggestion
You forgot to change the 2 lines that Bernd was referring to
I feel like a small newbie next to all of you and I have a lot to learn from all of you.
Thanks for sharing, it's very nice
For the Added transparency effect as per infratec suggestion
You forgot to change the 2 lines that Bernd was referring to
Code: Select all
;DrawImage(ImageID(Images()\img),Images()\x,Images()\y) ==>
DrawAlphaImage(ImageID(Images()\img),Images()\x,Images()\y,Images()\alphatest) ; draw all images with z-order
;Procedure AddImage(x,y,img,alphatest=0) ==>
Procedure AddImage(x,y,img,alphatest=255)
Thanks for sharing, it's very nice
Re: Merge & Position any no. of Images
Thanks ChrisR
Sorry,I am doing these changes blindly after you and infratec
I spent a lot of time to get any images that can show me that effect
But without any success
Just added the changes and the necessary code to keep everything intact
Still doing the changes blindly after both of you
So you are in trouble if it did not work
Sorry,I am doing these changes blindly after you and infratec
I spent a lot of time to get any images that can show me that effect
But without any success
Just added the changes and the necessary code to keep everything intact
Still doing the changes blindly after both of you

So you are in trouble if it did not work
Egypt my love
Re: Merge & Position any no. of Images
To get your good eyes back, I think you're playing with images that have their own transparency.
The addition here is to apply a transparency on an opaque image as below
ex with: #PB_Compiler_Home + "Examples\Sources\Data\Geebee2.bmp"

It seems better with If isCurrentItem
The addition here is to apply a transparency on an opaque image as below
ex with: #PB_Compiler_Home + "Examples\Sources\Data\Geebee2.bmp"

A little my fault with If ListSize(Images()) > 0 addedRASHAD wrote:As I expected there is a problem with Procedure Bring2Top(index)
It seems better with If isCurrentItem
On my side I use the GridMatch procedure for that, if it can helpdavido wrote:@RASHAD,
Could you introduce code to prevent images being moved out of bounds?
Code: Select all
Procedure.i GridMatch(Value.i, Min.i=0, Max.i=4096)
If Value < Min
ProcedureReturn Min
ElseIf Value > Max
ProcedureReturn Max
Else
ProcedureReturn Value
EndIf
EndProcedure
;Todo also for Case 6,7,8,9 (eg case 9: If Images()\y < GadgetHeight(0)-10 : Images()\y + 1 : DrawCanvas() : EndIf)
Case #PB_EventType_MouseMove
...
;Images()\x = x - currentItemXOffset ==>
Images()\x = GridMatch(x - currentItemXOffset, 0, GadgetWidth(0)-10)
;Images()\y = y - currentItemYOffset ==>
Images()\y = GridMatch(y - currentItemYOffset, 0, GadgetHeight(0)-10)
Re: Merge & Position any no. of Images
Hi ChrisR
Problem solved
I added preventing moving any image to left and top (Logic) to the 2 examples using native commands allready
I do not think that preventing moving right and bottom is a good idea while it is so easy to do it as I did for left & top
BTW :
No need for your Procedure it will be no good with grab the image by Mouse.
Thanks
Problem solved
I added preventing moving any image to left and top (Logic) to the 2 examples using native commands allready
I do not think that preventing moving right and bottom is a good idea while it is so easy to do it as I did for left & top
BTW :
No need for your Procedure it will be no good with grab the image by Mouse.
Thanks
Egypt my love