Author Topic: Some QB45 Graphic Statements on Canvas  (Read 7409 times)

0 Members and 1 Guest are viewing this topic.

Offline TempodiBasic

  • Forum Resident
  • Posts: 1792
    • View Profile
Some QB45 Graphic Statements on Canvas
« on: January 18, 2020, 07:28:07 am »
Hi
here my knowledge in progress on using Inform's Canvas with QB45 Graphic commands.

When I got more clear informations I'll post here for all those that are interested.


Thanks to read and feedback
* GraphicTestInform.zip (Filesize: 84.21 KB, Downloads: 532)
Programming isn't difficult, only it's  consuming time and coffee

Offline Qwerkey

  • Forum Resident
  • Posts: 755
    • View Profile
Re: Some QB45 Graphic Statements on Canvas
« Reply #1 on: January 18, 2020, 08:04:24 am »
Tempo, could you amend the attachment so as to be not a .zip file?  I never open .zip files, no matter whether I trust the originator (the only exception to this is the QB64 source in which I have no alternative).  Incidentally, what is Inform Canvas?  As a user of InForm (second only to you) I ought to know (but then I'm the blundering fool user).  I cannot find the Keyword Canvas in the InForm wiki.

FellippeHeitor

  • Guest
Re: Some QB45 Graphic Statements on Canvas
« Reply #2 on: January 18, 2020, 08:44:34 am »
@Tempo thanks for sharing this demo.

You will notice that your circles are poorly displayed (lots of missing sections), and that's explained due to two factors: Your picture box controls have both the Stretch and HasBorder properties set to true. That "steals" one pixel from each side of your picture box canvas and squeezes it into the border. Your drawing will render properly if you set both properties to false in the .frm file.

@Richard:
Tempo is talking about the fact that PictureBox controls can be used to display an image file *or* be used as a drawing canvas, in which case you can use QB64's regular drawing commands like LINE, CIRCLE, PSET, etc.

That's discussed in this wiki page: https://github.com/FellippeHeitor/InForm/wiki/PictureBox-Drawing

Offline TempodiBasic

  • Forum Resident
  • Posts: 1792
    • View Profile
Re: Some QB45 Graphic Statements on Canvas
« Reply #3 on: January 18, 2020, 10:41:24 am »
Hi and Thanks

@Fellippe you have saved me time to go on over my lackness of specific knowledge.
I'll go on with deselected HasBorder and Stretch.

@Richard
please don't put yourself behind me, it is a great mistake! And now I say you one of my secrets... I used to  proceed coding by Trial and Horror method!  :-) A method learned by me from Karl Popper!

Yes Canvas is the PictureBox used as a _NEWIMAGE panel into Inform program.
I hope that you have no trouble using a .TAR archive created by Peazip
* GRAPHICTEST.tar (Filesize: 605.5 KB, Downloads: 513)
Programming isn't difficult, only it's  consuming time and coffee