pltSFML
SFML binding for Plutonium Programming Language
This is a sfml module for plutonium programming language.
INSTALLATION
Use fiza package manager to install this module. Plutonium must be already installed.
Windows
cd C:\plutonium
plutonium fiza.plt install sfml
Linux
Make sure you have libsfml-dev installed before running the following command.
fiza instll sfml
HOW TO COMPILE
If you want to compile from source(perhaps to contribute or test) then run cmake directly. Note: You must install plutonium first on your system.
cmake . -DCMAKE_BUILD_TYPE=Release
You need to copy the resultant shared library or DLL to plutonium's modules folder(C:\plutonium\modules for Windows
and /opt/plutonium/modules for Linux)
Classes
The module provides following classes:
- RenderWindow
- __consturct__(width,height,title)
- display()
- clear(color = Black)
- pollEvent(eventObject)
- draw(drawableObj)
- close()
- setFramerateLimit(x)
- Event
- __construct__()
- type
- __del__()
- Other members are added to object(based on the type of event) when you pollEvent
- Color
- __construct__(r,g,b)
- __del__()
- Circle
- __construct__(radius)
- setPosition(x,y)
- setFillColor(color)
- setPointCount(n)
- __del__()
- Rectangle
- __construct__(width,height)
- setSize(width,height)
- setPosition(x,y)
- setFillColor(color)
- setOutlineColor(color)
- setOutlineThickness(x)
- getPosition()
- getGlobalBounds()
- __del__()
- VertexArray
- __construct__()
- resize(n)
- setPrimitiveType(type)
- setKth(x,y)
- __del__()
- Sprite
- __construct__()
- setTexture(texture)
- __del__()
- Texture
- __construct__()
- loadFromFile(filename)
- __del__()
- Font
- __construct__()
- loadFromFile(filename)
- __del__()
- Text
- __construct__()
- setFont(font)
- setCharacterSize(n)
- setPosition(x,y)
- setString(str)
- setFillColor(color)
- __del__()
- Vector2f
- x
- y
- FloatRect
- width
- height
- top
- left
- intersects(FloatRectObj)
- Clock
- __construct__()
- restart()
- __del__()
- Time
- asSeconds()
Naming Conventions
C++ | Plutonium |
---|---|
sf::RenderWindow | sfml.RenderWindow |
sf::Color | sfml.Color |
sf::Event | sfml.Event |
sf::Circle | sfml.Circle |
sf::Event::Closed | sfml.EventClosed |
sf::Keyboard::A | sfml.KeyboardA |