🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.sys.next.programmer
2 messages
2 total messages Started by J. G. Gregory Wed, 09 Sep 1992 18:15
What happened to "instance drawing"
#910
Author: J. G. Gregory
Date: Wed, 09 Sep 1992 18:15
12 lines
865 bytes
Way back when, there was this feature called "instance drawing".  It was  
documented in the Concepts docs, as well as the function docs.  Now I can't  
seem to find a description of it, except for the function definitions.  I  
especially expected to find it in the performance section of the docs.

I was surprised that the purple book doesn't mention it, either.

Does anyone know what the status is of instance drawing?  Is it going away?  I  
know it wasn't an Adobe thing, but that doesn't explain why NeXT doesn't  
discuss it.

--J Gregory
Re: What happened to "instance drawing"
#977
Author: Sam Streeper
Date: Fri, 11 Sep 1992 21:58
36 lines
1891 bytes
jgg@proforma.com (J. G. Gregory) writes:
> Way back when, there was this feature called "instance drawing".  It was  
> documented in the Concepts docs, as well as the function docs.  Now I can't  
> seem to find a description of it, except for the function definitions.  I  

When you use a buffered window, all your drawing goes to the buffer and
isn't immediately visible.  You make it visible by doing a flushWindow,
which copies the changed bits in the buffer to the visible areas of the
screen.

When you turn on instance drawing, you draw directly onto your window's
area on the screen, and the drawing never touches the buffer, so it doesn't
get saved.  It can be used for temporary drawing or animation, but since  
there's no buffering you see the erasures happening and it tends to look
flickery (and to my eye, cheesy and unprofessional)

The basic algorithm looks like this:

PSsetinstance(YES);
while (temporaryAnimation) {
	PSnewinstance();	// erase old instance drawing
	[self drawSomething];	// draw temporary stuff
	}
PSsetinstance(NO);

I suggest you avoid instance drawing, and instead look at Draw or
ScrollDoodScroll's NiftyMatrix to see how to do double buffered animations.

-sam
ps I noticed last night that NiftyMatrix has an error that causes it to cache
its browser incorrectly.  The solution is to remove the call to
convertFromSuperview.

--
Opinions expressed herein are not those of my employer.  They're not even
mine.  They're probably wrong besides.  How did they get in here, anyway?
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads