[Done] 540ß10 Circle and Resize Image

Post bugreports for the Windows version here
User avatar
Michael Vogel
Addict
Addict
Posts: 2806
Joined: Thu Feb 09, 2006 11:27 pm
Contact:

[Done] 540ß10 Circle and Resize Image

Post by Michael Vogel »

Startet now with 5.40 and saw some differences in graphic routines, so circles seems to be larger now, at least in the following code where they touch the image border...
...and smooth resizing is not that fine anymore as some darker pixels are seen in the result.

Here's the code:

Code: Select all


Macro CreateTransparentImage(image,x,y)

	CompilerIf #PB_Compiler_Version<512
		CreateImage(image,x,y,32|#PB_Image_Transparent)
	CompilerElse
		CreateImage(image,x,y,32,#PB_Image_Transparent)
	CompilerEndIf

EndMacro

#WinFnC=51
#ColorCursorLight=$c0c0c0
#DrawOpaque=$ff000000

OpenWindow(0,0,0,600,200,"Resize Test")
For i=1 To 3
	CreateTransparentImage(i,#WinFnC<<1,#WinFnC<<1)
	StartDrawing(ImageOutput(i))
	DrawingMode(#PB_2DDrawing_AlphaBlend)
	Circle(#WinFnC,#WinFnC,#WinFnC-1,#DrawOpaque|#ColorCursorLight)
	StopDrawing()
	Select i
	Case 1
		ResizeImage(i,#WinFnC,#WinFnC)
	Case 2
		ResizeImage(i,#WinFnC,#WinFnC,#PB_Image_Raw)
	EndSelect
	x=(i-1)*200
	ImageGadget(i,x,0,200,200,ImageID(i))
Next i

Repeat
Until WaitWindowEvent()=#PB_Event_CloseWindow
PS: a workaround for the resizing issue is adding DrawingMode(#PB_2DDrawing_AllChannels) and Box(0,0,#WinFnC<<1,#WinFnC<<1,#ColorCursorLight)
Fred
Administrator
Administrator
Posts: 18199
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: [Done] 540ß10 Circle and Resize Image

Post by Fred »

Fixed.
Post Reply