ftp.nice.ch/Attic/openStep/developer/resources/MiscKit.2.0.5.s.gnutar.gz#/MiscKit2/Tests/TestMMA/MiscPSView.rtf

This is MiscPSView.rtf in view mode; [Download] [Up]

Copyright © 1996 by Uwe Hoffmann All Rights Reserved.  



MiscPSView





Inherits From:	NSView
Declared In:	MiscPSView.h




Class Description

The MiscPSView class defines a view that will draw itself using user specified PostScript commands.

Unlike a regular view, a MiscPSView view maintains a PostScript command buffer whose contents are interpreted when the view draws itself.  This buffer can be modified dynamically.  In this way, MiscPSView provides a class for rendering variable PostScript images.  Commands in the buffer may reference the constants miscwidth and mischeight (defined in the PostScript context).  These constants represent the view's dimensions.

To allow for initialization before and clean-up after the drawing process, the MiscPSView class provides hooks for subclasses to overwrite: writePSPreambleInContext: and writePSPostambleInContext:.

The MiscPSView class implements a cache for faster drawing.  The postscript data has to be interpreted only when the cache is invalid. 




Instance Variables

No public or protected instance variables defined in this class.




Method Types

Accessing and setting the postscipt data
	- setPostScriptData:
	- postscriptData

Preamble and postamble hooks for subclasses
	- writePSPreambleIn:
	- writePSPostambleIn:




Instance Methods

postscriptData

- (NSData *)postscriptData

Returns the contents of the Postscript command buffer of the receiver. 



setPostScriptData:

- (void)setPostScriptData:(NSData *)data

Fills the Postscript command buffer of the receiver with the contents of data. 



writePSPostambleInContext:

- (void)writePSPostambleInContext:(NSDPSServerContext *)aContext

Cleans up Postscript environment in the context aContext.  The MiscPSView implementation of this method does nothing. 



writePSPreambleInContext:

- (void)writePSPreambleInContext:(NSDPSServerContext *)aContext

Writes Postscript initialization in the context aContext.  The MiscPSView implementation of this method does nothing. 

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.