Open Forum > What's New

ScriptBasic - Raspberry Pi

<< < (2/2)

Support:
This shows some of the SDL_gfx graphic primitives.


--- Code: Script BASIC ---' SDL_gfx Demo IMPORT gfx.bas screen = gfx::Window(700, 600, "ScriptBasic GFX Demo - Raspberry Pi")gfx::pixelRGBA(screen, 10, 15, 255, 255, 255, 255)gfx::lineRGBA(screen, 20, 10, 70, 90, 255, 0, 0, 255)gfx::trigonRGBA(screen, 500, 50, 550, 200, 600, 150, 0, 255, 255, 255)gfx::filledTrigonRGBA(screen, 200, 200, 300, 50, 400, 200, 0, 0, 255, 255)gfx::rectangleRGBA(screen, 10, 300, 100, 380, 0, 255, 0, 255)gfx::boxRGBA(screen, 210, 76, 325, 300, 255, 0, 0, 150)gfx::ellipseRGBA(screen, 600, 400, 50, 90, 255, 255, 0, 200)gfx::filledEllipseRGBA(screen, 600, 400, 25, 150, 0, 255, 0, 255)x[0] = 350x[1] = 275x[2] = 300x[3] = 325x[4] = 350x[5] = 400y[0] = 325y[1] = 325y[2] = 390y[3] = 390y[4] = 375gfx::polygonRGBA(screen, x, y, 6, 255, 255, 255, 155)s[0] = 400s[1] = 450s[2] = 450s[3] = 425s[4] = 300t[0] = 400t[1] = 410t[2] = 450t[3] = 425t[4] = 500gfx::filledPolygonRGBA(screen, s, t, 5, 255, 0, 255, 155)gfx::UpdateWHILE gfx::KeyName(1) <> "+escape"WENDgfx::Close 

Support:
Attached are the extension modules and dependencies need for the bbc and gfx extension modules. These extensions only work with the DEB install at this time.

One must install the SDL 1.2 and SDL_gfx 1.2 runtime libraries.

sudo apt-get install libsdl1.2debian-1.2.15+dfsg1-4+rpt2
sudo apt-get install libsdl-gfx1.2-5-2.0.25-5

BBC
1. unzip the bbc.zip file in a temp directory
2. sudo cp bbc.so /usr/local/lib/scriba/
3. sudo cp bbc.bas /usr/local/include/scriba/
4. sudo cp libbbc.so /usr/lib/


SDL_gfx
1. unzip the gfx.zip file in a temp directory
2. sudo cp gfx.so /usr/local/lib/scriba/
3. sudo cp gfx.bas /usr/local/include/scriba/

Use the ScriptBasic example code posted in this thread to test your installation.

Navigation

[0] Message Index

[*] Previous page

Go to full version