40 lines
1.1 KiB
Text
40 lines
1.1 KiB
Text
programa {
|
|
// includes graphics library and use an alias
|
|
inclua biblioteca Graficos --> g
|
|
|
|
// define WIDTH and HEIGHT integer constants
|
|
const inteiro WIDTH = 200
|
|
const inteiro HEIGHT = 100
|
|
|
|
// main entry
|
|
funcao inicio() {
|
|
// begin graphical mode (verdadeiro = true)
|
|
g.iniciar_modo_grafico(verdadeiro)
|
|
|
|
// define window title
|
|
g.definir_titulo_janela("Hello")
|
|
|
|
// define window dimesions
|
|
g.definir_dimensoes_janela(WIDTH, HEIGHT)
|
|
|
|
// while loop
|
|
enquanto (verdadeiro) {
|
|
// define color to black(preto) and clear window
|
|
g.definir_cor(g.COR_PRETO)
|
|
g.limpar()
|
|
|
|
// define color to white(branco)
|
|
g.definir_cor(g.COR_BRANCO)
|
|
// set text font size
|
|
g.definir_tamanho_texto(32.0)
|
|
// draws text
|
|
g.desenhar_texto(0, HEIGHT / 3, "Hello, world!")
|
|
|
|
// calls render function
|
|
g.renderizar()
|
|
}
|
|
|
|
// end graphical mode
|
|
g.encerrar_modo_grafico()
|
|
}
|
|
}
|