Page 5 of 5
Posted: Wed Oct 13, 2004 9:11 am
by El_Choni
Just arrived, haven't even tested 3.92 yet, but I hope all will work ok soon (included TailBite which, as Paul reported me by e-mail, has some problems with 3.92).
Regards,
Posted: Mon Jan 10, 2005 11:20 pm
by El_Choni
Looks like TailBite now works correctly with X2D, without having to install the helper libraries (TB_IncludeFont and TB_Include2DDrawing). At least, it works here now (TailBite 1.2 Beta 1.10)
Regards,
Posted: Fri Mar 25, 2005 8:06 am
by Shannara
Any updates for this library?
Posted: Sat Mar 26, 2005 8:43 pm
by Dräc
Hi!
My request consists into filling easily an area by repeating an image (like the html background page process) without using For/Next loops and taking care about area boundaries.
But, X2D library doesn’t allow to change the size of the brush yet.
My suggestion: to set the brush size according to the image one when X2D_SetPatternBrush(image.l) is used !
Regards.
Posted: Sat Mar 26, 2005 9:48 pm
by Dräc
I suppose having found a bug:
By setting a color different than $0 into X2D_DrawTransparentImage() command,
the drawing is correct the fist time but not after if the same image is used.
This, because whatever the specified transparent color is, it is then changed into $0 in the original image!!!
The following code illustrates the purpose:
Code: Select all
OpenWindow(1, 100, 100, 300, 300, #PB_Window_SystemMenu, "X2D")
CreateGadgetList(WindowID())
CreateImage(1, 300, 300)
CreateImage(2, 70, 24)
StartDrawing(ImageOutput())
Box(0,0,70,24,RGB(255,0,255))
X2D_RoundBox(0, 0, 9, 9, 3, 3, $FF0000)
Circle(5, 5, 2, $00FFFF)
FrontColor(255, 255, 0)
DrawingMode(1)
Locate(0, 10)
DrawText("PureBasic")
StopDrawing()
ImageGadget(1, 0, 0, 300, 300, UseImage(1))
x=Random(200)+50
y=Random(200)+50
xd=3
yd=4
loop=0
Repeat
If x>230 Or x<0
xd=-xd
EndIf
If y>274 Or y<0
yd=-yd
EndIf
x+xd
y+yd
UseImage(1)
StartDrawing(ImageOutput())
For c=0 To 299
FrontColor(0, c/2.5, c/2.5)
Line(0, c, 300, 0)
Next
X2D_DrawTransparentImage(UseImage(2), x, y, RGB(255,0,255))
;X2D_DrawTransparentImage(UseImage(2), x, y, 0)
StopDrawing()
SetGadgetState(1, UseImage(1))
Delay(25)
If loop=0
Delay(1000)
EndIf
event = WindowEvent()
If event = #PB_Event_CloseWindow
End
EndIf
loop=1
ForEver
Posted: Fri Apr 01, 2005 10:01 am
by Dräc
I have download the library source:
The raison of my previous posted observation takes place in the ImageList_AddMasked API function where the specified color used to generate the mask (parameter crMask) leads to a change to black of this color
in the specified bitmap.
Does it suitable ?!
If not, I propose to copy the bitmap in order to not alterate the original image:
Code: Select all
ProcedureDLL X2D_DrawTransparentImage(ImageID.l, x.l, y.l, transpRGB.l) ; Draws an Image with one color set to transparent
hDC.l
MOV EAX, [_PB_2DDrawing_CurrentDC]
MOV hDC, EAX
GetObject_(ImageID, SizeOf(BITMAP), bm.BITMAP)
ImageID=CopyImage_(ImageID, #IMAGE_BITMAP, bm\bmWidth, bm\bmHeight, 0)
imglist = ImageList_Create_(bm\bmWidth, bm\bmHeight, #ILC_COLORDDB|#ILC_MASK, 1, 0)
ImageList_AddMasked_(imglist, ImageID, transpRGB)
ImageList_Draw_(imglist, 0, hDC, x, y, #ILD_TRANSPARENT)
ImageList_Destroy_(imglist)
DeleteObject_(ImageID)
EndProcedure
Posted: Tue Jun 07, 2005 1:12 pm
by Kale
Is there a newly compiled downloadable lib? im still getting the TB_INCLUDEFONT error.

Posted: Tue Jun 07, 2005 2:56 pm
by El_Choni
Oops, I'll have a look tonight.
EDIT: I have an old source, do you know where I can download the latest one? But maybe it's freedimension who needs just to recompile the lib with latest TailBite. I'm confused

Posted: Tue Jun 07, 2005 9:36 pm
by Kale
But maybe it's freedimension who needs just to recompile the lib with latest TailBite.
Thats what im thinking too. c'mon freedimension give us some love!

Re: X2D - eXtended 2D
Posted: Fri Jan 20, 2012 12:49 am
by IdeasVacuum
This sounds like a fabulous lib - can anyone resurrect it?
Re: X2D - eXtended 2D
Posted: Fri Jan 20, 2012 2:55 am
by Bisonte
I do not know the functions of this lib, but it seems that the most of them
are now native in PB...
Like DrawAlphaImage etc...
This is from 2004... PB 3.91
Re: X2D - eXtended 2D
Posted: Fri Jan 20, 2012 7:56 pm
by Andre
IdeasVacuum wrote:This sounds like a fabulous lib - can anyone resurrect it?
Even if I don't have the time to update
www.PureArea.net regularly, especially with newer stuff, you can find many collected PureBasic stuff there. So also the X2D lib - just take a look at the "UserLibs" section...

Re: X2D - eXtended 2D
Posted: Fri Jan 20, 2012 8:16 pm
by IdeasVacuum
Thanks Andre, unfortunately the PureArea version is way out of date (2004) and the source is not included.

Re: X2D - eXtended 2D
Posted: Sat Jan 21, 2012 11:52 am
by IdeasVacuum