Page 4 of 5

Posted: Thu Jul 29, 2004 1:57 am
by El_Choni
This is my 500th post!!! I would like to celebrate with an useful post, but I just can't figure anything useful right now... Dunno: enjoy life, don't waste your time working for somebody else, wake up at three, eat, drink and f*** as much as you can or someone else will.

All this works for me

Regards, :twisted: :mrgreen: :twisted:

Posted: Wed Aug 04, 2004 5:19 pm
by freedimension
OK, can someone please test and confirm the functionality of the newly compiled lib: http://www.physical-touch.de/X2D (attention, no zip, just the plain lib-file)

Posted: Wed Aug 04, 2004 5:21 pm
by thefool
All this works for me
sure....
:P

Posted: Wed Aug 04, 2004 6:19 pm
by NoahPhense
El_Choni wrote: wake up at three, eat, drink and f*** as much as you can or someone else will.
Congrats... and in your quote, you mean fart right.? 8O

Posted: Sat Aug 14, 2004 1:17 pm
by eddy
nice job... it's very usefull

a suggestion:

Code: Select all

imageid = X2D_ExtracAlphaChannel( #ID, PNGfilename.s )

Posted: Sat Aug 14, 2004 7:18 pm
by Kale
I get the following error with the attached code:

The following PureLibrary is missing: TB_INCLUDEFONT

Code: Select all

;===========================================================================
;-CONSTANTS
;===========================================================================

#APP_NAME = "Window Template"

Enumeration
    #WINDOW_ROOT
EndEnumeration

;===========================================================================
;-GLOBAL FLAGS / VARIABLES / STRUCTURES / ARRAYS
;===========================================================================

;Get the background colour of the windows
BackgroundColour = GetSysColor_(#COLOR_3DFACE)

;===========================================================================
;-PROCEDURES
;===========================================================================

;Handle an error
Procedure HandleError(Result, Text.s)
    If Result = 0 : MessageRequester("Error", Text, #PB_MessageRequester_Ok) : End : EndIf
EndProcedure

;===========================================================================
;-MEDIA
;===========================================================================

LoadImage(2, "Passport.bmp")
LoadImage(3, "AlphaChannel.bmp")

;Set the alpha channel to the image
X2D_SetAlphaChannel(UseImage(2), UseImage(3))

;===========================================================================
;-GEOMETRY
;===========================================================================

HandleError(OpenWindow(#WINDOW_ROOT, 0, 0, 400, 300, #PB_Window_SystemMenu | #PB_Window_ScreenCentered, #APP_NAME), "Main window could not be created.")

;Create an image to draw the transparent sprite onto
CreateImage(1, 400, 300)
;Display the image on a gadget
CreateGadgetList(WindowID(#WINDOW_ROOT))
    ImageGadget(1, 0, 0, 400, 300, UseImage(1))

;===========================================================================
;-MAIN LOOP
;===========================================================================

Repeat

    UseImage(1)
    StartDrawing(ImageOutput())
        ;Fill that image with the correct colour to make it look like part of the window
        Box(0, 0, 400, 300, BackgroundColour)
        ;Draw the image containing the alpha channel
        X2D_DrawAlphaImage(UseImage(2), WindowMouseX(), WindowMouseY(), 255, #X2D_AlphaMask)
    StopDrawing()

    SetGadgetState(1, UseImage(1))

    EventID.l = WindowEvent()
    Select EventID

    EndSelect
    Delay(1)
Until EventID = #PB_Event_CloseWindow
End

;===========================================================================
;-BINARY INCLUDES
;===========================================================================

Posted: Sat Aug 14, 2004 7:33 pm
by freedimension
@Kale: We will have to wait till El_Choni is back from his Europe Roundtrip. I can't even compile the Source anymore under 3.91 ;-)
I think he and I can work on this in september.

@eddy: Good idea.


Thanks for the input guys.

Posted: Fri Aug 20, 2004 3:00 am
by eddy
a aplha extractor would be cool. :)

It's such a pity that PB can't read alpha information :roll:

Posted: Fri Aug 20, 2004 7:07 am
by freedimension
eddy wrote:a aplha extractor would be cool. :)

It's such a pity that PB can't read alpha information :roll:
You mean reading in a PNG and extracting the information of the Alpha-Channel? Could be done, though I don't know how complicated the PNG format is. Have to read the specifications about that.

But it will take it's time, as I'll be away at least one week. I'm flying to Madrid today staying there for 4 months and I don't know when or how I will have the opportunity to go into the internet.

Posted: Fri Aug 20, 2004 10:32 pm
by El_Choni
Hmm... weird problem (about TB_INCLUDEFONT),I ll check it when I m back. Having a great time, right now in Budapest, conmemorating their 1000 annyversary with fireworks, beer, and what not. It s a pity they speak such an odd language Cya

Posted: Thu Sep 30, 2004 12:23 am
by Kale
El_Choni wrote:Hmm... weird problem (about TB_INCLUDEFONT),I ll check it when I m back. Having a great time, right now in Budapest, conmemorating their 1000 annyversary with fireworks, beer, and what not. It s a pity they speak such an odd language Cya
Anymore news on this im still getting the TB_INCLUDEFONT error. :(

Posted: Thu Sep 30, 2004 1:12 am
by El_Choni
I'm working on it. I had freedimension yesterday sitting just by my side, and he can tell you it's not that easy, but I know how to solve it. It'll be fixed this week.

Regards,

Posted: Thu Sep 30, 2004 8:02 am
by freedimension
El_Choni wrote:I'm working on it. I had freedimension yesterday sitting just by my side, and he can tell you it's not that easy, but I know how to solve it. It'll be fixed this week.

Regards,
ACK, very weird problem. But I'm sure El_Choni will find the answer :)

Posted: Thu Sep 30, 2004 12:11 pm
by Kale
nice :)

Posted: Tue Oct 12, 2004 11:06 am
by TheBeck
So this lib is not working at all under 3.91? :cry:

I really need the transparent image function. Any word on when this will be working again?