Extension Modules > IUP

IUP Linux and Windows

<< < (8/10) > >>

Support:
ScriptBasic does graphics! Here is a quick test of the CD (Canvas Draw) API in action.


--- Code: ---IMPORT iup.bas

Iup::Open()

ican = Iup::Canvas()
Iup::SetAttribute(ican, "RASTERSIZE", "800x600")
Iup::SetAttribute(ican, "BORDER", "NO")

dlg = Iup::Dialog(Iup::Vbox(ican))
Iup::SetAttribute(dlg, "TITLE", "Mandelbrot Set")

Iup::Map(dlg)

ccan = CD::CreateCanvas(CD::ContextIup(), ican)

Iup::Show(dlg)

przelx = 3 / 800
przely = 2 / 600

FOR x = 1 TO 800
  FOR y = 1 TO 600
    a = 0
    b = 0
    c = 0
    x2 = (przelx * x) - 2
    y2 = (przely * y) - 1
    petla:
    a2 = a * a - b * b
    b2 = 2 * a * b
    a = a2 + x2
    b = b2 + y2
    z = a * a + b * b
    IF z < 4 AND c < 255 THEN
      c = c + 1
      GOTO petla
    END IF
    IF c = 255 THEN
      pixclr = CD::EncodeColor(0, 0, 0)
    ELSE
      g = 255 - c
      pixclr = CD::EncodeColor(g, g, g)
      ' Color version
      ' pixclr = (g+64) * g * (g+16)
    END IF
    CD::CanvasPixel(ccan, x, y, pixclr)
  NEXT y
NEXT x

Iup::MainLoop()
Iup::Close()
END

--- End code ---

Support:
I hope to get BUILD 11 out this weekend for Linux (32/64) and Windows 32.

You could create a VirtualBox on your Windows PC and run Ubuntu 32 in it for testing and experimentation. Ubuntu has a dual boot option that uses a portion of your NTFS Windows file system so you don't need to partition your disk. If your PC is new enough and can boot off a USB drive, that is another great way to run Linux as a secondary OS.

Support:
The graphics will be available in build 11. The build 10 release just enabled additional controls. (matrix, dial, color select, ...)

It won't be long. The CD API is pretty extensive and wrapping / testing it takes time.

To find out what IUP functions are enabled in the SB IUP extension module, look at the iup.bas include file.

I hope to get a SB version of the IUP docs on the SB wiki when I finish the interface code.

Support:
Sorry Ron for the delay with BUILD 11. No snags with IUP/CD, only with real life commitments.

I will try to have something up this week.

Support:
I now have Windows 7 64 bit installed and will be picking back up with the IUP project on both Windows and Linux platforms in 64 bit only.

Stay Tuned!

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version