KiXforms Forum Index KiXforms
The Forum for the KiXforms Community
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 Quick Links 
Site News
Downloads
Documentation
Donations
Script Archive
Tracking Systems

another picturebox buggy

 
Post new topic   Reply to topic    KiXforms Forum Index -> Discussion
View previous topic :: View next topic  
Author Message
Lonkero
KiXforms Devotee
KiXforms Devotee


Joined: 13 Mar 2003
Posts: 1022
Location: Espoo, Finland

PostPosted: Mon Aug 30, 2004 8:38 pm    Post subject: another picturebox buggy Reply with quote

was enchanging my game once again and find out that:
in picturebox, $pb.line() can't be drawn over same area again.

I can clean the area with rectangle or so but trying to write to same pixels again with line() fails.

I call this: no-multi-lining-on-same-pixel bug Very Happy

in some odd occurances, I was able to print lines over lines, when they did not start or finish over the previous line.
but trying to do the exact same line with different color, always fails.

this is a bug of PB in addition of point() bug found earlier.

_________________
Hammer
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Jochen
KiXforms Devotee
KiXforms Devotee


Joined: 05 Mar 2003
Posts: 1204
Location: Stuttgart, Germany

PostPosted: Tue Aug 31, 2004 7:41 am    Post subject: Reply with quote

hmmm ... how about replacing .PictureBox with .Panel or if this doesn't fit trying it with .Bitmap ... on second thought, .Bitmap might be to 'weak' for it.

Might work on .Panel, just a thought

_________________
Jochen

Tell me, and I will forget.
Show me, and I may remember.
Involve me, and I will understand.
Back to top
View user's profile Send private message MSN Messenger
Jochen
KiXforms Devotee
KiXforms Devotee


Joined: 05 Mar 2003
Posts: 1204
Location: Stuttgart, Germany

PostPosted: Tue Aug 31, 2004 8:06 am    Post subject: Reply with quote

ok, Panel is a nono ...

just out of interest, can you review this snippet and change the code so that I can see it too ?

Code:
break on

$_ = srnd(@msecs)

$f = createobject("KiXtart.Form")

$pbx = $f.PictureBox()
$pbx.Bounds = 5,5,$f.ClientWidth-10,$f.ClientHeight-40
$pbx.DrawWidth = 2
$pbx.BorderStyle = 1

$b = $f.Button("Click Me",$f.ClientWidth/2-40,$f.ClientHeight-30,80,25)
$b.OnClick = "
              $$c = $$f.RGB(rnd(255), rnd(255), rnd(255))
              $$pbx.Line(5,5,$$pbx.ClientWidth-5,$$pbx.ClientHeight-5,$$c)
              $$pbx.Line(5,$$pbx.ClientHeight-5,$$pbx.ClientWidth-5,5,$$c)
             "

$f.Show

while $f.Visible
    $_ = execute($f.DoEvents)
loop

exit 1



[edit: code updated to let the line stay away from corners]

_________________
Jochen

Tell me, and I will forget.
Show me, and I may remember.
Involve me, and I will understand.
Back to top
View user's profile Send private message MSN Messenger
Lonkero
KiXforms Devotee
KiXforms Devotee


Joined: 13 Mar 2003
Posts: 1022
Location: Espoo, Finland

PostPosted: Wed Sep 01, 2004 11:10 pm    Post subject: Reply with quote

well, your code works.
but the problem it is that it's way too easy for the picturebox.
I started to get find bugs with it when it had huge amount of data in it.

anyway, I can try to code an short example for you, once I get the time.
or code around it, like I've done earlier too...
I just hate going with real fonts with the workaround as they don't look as nice as my imaged ones...

_________________
Hammer
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    KiXforms Forum Index -> Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group