Draw a pixel: Difference between revisions

no edit summary
m (→‎{{header|Phix}}: added online link (and on the right page this time))
No edit summary
Line 1,879:
sl.Line.ForeColor.RGB = RGB(Red:=255, Green:=0, Blue:=0)
End Sub</lang>
 
=={{header|Vlang}}==
<lang vlang>import ui
import gg
import gx
 
fn canvas_draw(gg &gg.Context, app &State, c &ui.Canvas) { // x_offset int, y_offset int) {
gg.draw_pixel(100, 100, gx.red)
}
 
struct State {
mut:
window &ui.Window = voidptr(0)
started bool
is_error bool
}
 
fn main() {
mut app := &State{}
window := ui.window(
width: 320
height: 240
state: app
children: [
ui.canvas(
draw_fn: canvas_draw
)
]
)
app.window = window
ui.run(window)
}</lang>
 
=={{header|Wee Basic}}==
338

edits