Large gnome::canvas problem

hi,

I have a little problem with displaying items in ‘big’ canvas, test
code:

#!/usr/bin/env ruby

require ‘gnomecanvas2’

window = Gtk::Window.new
window.signal_connect(“delete_event”) do |widget, event|
Gtk::main_quit
end

box = Gtk::VBox.new(false, 4)
window.add(box)

points = [[200, 10], [79800, 190]]

canvas = Gnome::Canvas.new(true)
canvas.set_size_request(500, 200)
canvas.set_scroll_region(0, 0, 80000, 200);
canvas.center_scroll_region = false
canvas.show
Gnome::CanvasLine.new(canvas.root,
{:points => points,
:fill_color_rgba => 0x00ff00ff,
:width_pixels => 10.0})
box.pack_start(canvas)

scroll = Gtk::HScrollbar.new(canvas.hadjustment)
scroll.show
box.pack_start(scroll)

adj = canvas.hadjustment

canvas = Gnome::Canvas.new(false)
canvas.set_size_request(500, 200)
canvas.set_scroll_region(0, 0, 80000, 200);
canvas.center_scroll_region = false
canvas.show
canvas.hadjustment = adj

Gnome::CanvasLine.new(canvas.root,
{:points => points,
:fill_color_rgba => 0xff000000,
:width_pixels => 10.0})
box.pack_start(canvas)

box.show
window.show

Gtk.main

the green line is in ‘antialiased’ canvas and looks good, red which is
not antialiased looks strange, in fact I,ve got two lines or three
(different look on different systems)

any idea?

thanks in advance

disclaimer: beginer in ruby and gtk, bad english :wink:

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs