graphic clipboard

Pixilang programming language
pasbel
Posts: 18
Joined: Mon Jul 02, 2012 2:19 pm

graphic clipboard

Postby pasbel » Sat Dec 05, 2015 3:12 pm

Hi
What is the better way to make a graphic clipboard ?
In my program, I open dialog-like box for information, and when I quit this dialog, I redraw all screen, I think it's not the best way for speed.
I wish to put dialog zone before to see it in a "clipboard", to redraw only this zone after quit my dialog to improve speed

pasbel
Posts: 18
Joined: Mon Jul 02, 2012 2:19 pm

Re: graphic clipboard

Postby pasbel » Thu Dec 10, 2015 11:29 pm

Best code I did :

before draw rectangle :

Code: Select all

rectangle_buffer = new( rectangle_sizex , rectangle_sizey , INT )
clean( rectangle_buffer, -1 )
   
loop_y = 0
while ( loop_y < rectangle_sizey ){
   loop_x = 0
   while ( loop_x < rectangle_sizex ){
      rectangle_buffer [ loop_x , loop_y ] = get_dot( rectangle_posx + loop_x , rectangle_posy + loop_y )
      loop_x = loop_x + 1
   }//end while
   loop_y = loop_y + 1
}//end while


Then I draw my picture :

Code: Select all

fbox ( rectangle_posx , rectangle_posy ,rectangle_sizex , rectangle_sizey , rectangle_fill )
frame( 0 ,  rectangle_posx ,  rectangle_posy ,  rectangle_sizex ,  rectangle_sizey )


To delete my picture, I redraw buffer :

Code: Select all

loop_y = 0
while ( loop_y < rectangle_sizey ){
   loop_x = 0
   while ( loop_x < rectangle_sizex ){
      dot( rectangle_posx + loop_x , rectangle_posy + loop_y , rectangle_buffer [ loop_x , loop_y ] )
      loop_x = loop_x + 1
   }//end while
   loop_y = loop_y + 1
}//end while
frame( 0 ,  rectangle_posx ,  rectangle_posy ,  rectangle_sizex ,  rectangle_sizey )
remove(rectangle_buffer )

User avatar
DigitalNematode
Posts: 55
Joined: Thu Dec 17, 2015 10:06 am
Location: Chicago

Re: graphic clipboard

Postby DigitalNematode » Tue Jan 05, 2016 10:47 am

I don't have anything to share with you regarding this. But every little bit helps. So I'm thanking you for what you shared. :) EDIT > I learn by example and I hate asking questions :/ Arn't enough, or haven't seen enough project files to make complete sense of it. So far I can swap in my track... change images... Its the placement, adjustment... Ahhhhh. :/ I'll figure it out... Eventually. Thanks again.

pasbel
Posts: 18
Joined: Mon Jul 02, 2012 2:19 pm

Re: graphic clipboard

Postby pasbel » Tue Jan 05, 2016 12:35 pm

just like me...

Image

iaon
Posts: 176
Joined: Mon Jun 02, 2014 7:56 am

Re: graphic clipboard

Postby iaon » Tue Jan 05, 2016 7:11 pm

Is there another language most similar in syntax to pixilang, so that some programming principles can be learned analogously?
(Getting off topic, I realize...)

pasbel
Posts: 18
Joined: Mon Jul 02, 2012 2:19 pm

Re: graphic clipboard

Postby pasbel » Tue Jan 05, 2016 8:32 pm

python, processing but I think they need some additionnal library for MIDI, sound synthesis,...
There is some basic language too but it's difficult too to make MIDI...

I work to make a graphic interface for use with my future project, I wish to use pixilang with ITX mini board with Windows or Linux
http://www.dr-midik.fr/pixilang/midi_se ... -12-05.zip


Return to “Pixilang”

Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest

cron