StopDrawA

2D_DrawA ››
Parent Previous Next

StopDrawA

Синтаксис

Sub StopDrawA()

Описание

Функция работает в паре с ImageStartDrawA или с WindowStartDrawA. Заканчивает рисование и освобождает ресурсы графики GDI+ в Windows , CAIRO в Linux

Параметры

нет

Платформы

Windows , Linux

Пример

#Include "window9.bi"
Dim As Any Ptr Gpbitmap=Create_ImageA(200,200)
Dim As Hbitmap bmp
Dim As HWND hw
#define Rndcolor  BGR(Int(Rnd*255),Int(Rnd*255),Int(Rnd*255))Or &hA0000000
ImageStartDrawA(Gpbitmap)
ModeDrawA(ANTIALIAS_GOOD)'QualityModeHigh
For a As Integer=1 To 40
  CircleDrawA(Rnd*200,Rnd*200,30,Rndcolor,,Rndcolor,,3)
Next
StopDrawA
hw=OpenWindow("GDI+",100,100,200,200)
CenterWindow(hw)
bmp=CreateHBitmapFromGpBitmap(GpBitmap,&hf0f0f0)
ImageGadget(1, 0,0,300,300, bmp)
Do:Loop Until WaitEvent()= eventclose
FreeGpBitmap(Gpbitmap):Free_Image(bmp)

Результат

Created with the Personal Edition of HelpNDoc: Full featured multi-format Help generator