Draw an antialiased circle?

Just starting out? Need help? Post your questions and find answers here.
User avatar
STARGÅTE
Addict
Addict
Posts: 2235
Joined: Thu Jan 10, 2008 1:30 pm
Location: Germany, Glienicke
Contact:

Re: Draw an antialiased circle?

Post by STARGÅTE »

Code: Select all

OpenWindow(0, 0, 0, 600, 600, "Smooth Circle")
CreateImage(0, 1000, 1000, 32, #PB_Image_Transparent)            ;  would like to make this transparent
StartDrawing(ImageOutput(0))
DrawingMode(#PB_2DDrawing_AlphaBlend)
Circle(500, 500, 300, $FF0000FF)
StopDrawing() 
ResizeImage(0, 500, 500)
ImageGadget(0, 0, 0, 500, 500, ImageID(0))

While WaitWindowEvent() ! #PB_Event_CloseWindow : Wend
PB 6.01 ― Win 10, 21H2 ― Ryzen 9 3900X, 32 GB ― NVIDIA GeForce RTX 3080 ― Vivaldi 6.0 ― www.unionbytes.de
Lizard - Script language for symbolic calculations and moreTypeface - Sprite-based font include/module
firace
Addict
Addict
Posts: 946
Joined: Wed Nov 09, 2011 8:58 am

Re: Draw an antialiased circle?

Post by firace »

@STARGÅTE: Thx!! I had actually tried something like that, but forgot about the RGBA color... :oops:
Post Reply