From dwalker@art.acorn.co.uk  Wed Nov 13 11:07:38 1996
Return-Path: <dwalker@art.acorn.co.uk>
Received: from ether310.art.acorn.co.uk by art-1.acorn.co.uk (SMI-8.6/SMI-SVR4)
	id LAA28579; Wed, 13 Nov 1996 11:07:37 GMT
Date: Wed, 13 Nov 1996 11:05:07 +0000 (GMT)
From: Dave Walker <dwalker@art.acorn.co.uk>
Subject: Developer News 12/11/96:  (fwd)
To: jabela
Message-ID: <Marcel-1.08-1113110507-345LJLo@ether310.art.acorn.co.uk>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; CHARSET=ISO-8859-1
X-Organization: Acorn Risc Technologies (a division of Acorn Computer Group plc)
X-Mailer: ANT RISCOS Marcel [ver 1.08]


-- 
Dave Walker, Engineering Support Manager
Acorn Risc Technologies (a division of the Acorn Computer Group plc), Acorn
House, 645 Newmarket Road, Cambridge CB5 8PB
---------- Forwarded message ----------
Date: Tue, 12 NOV 1996 10:51:39 +0000 (GMT)
From: Dave Walker <dwalker@art.acorn.co.uk>
To: isvquery@art-1
Subject: Developer News 12/11/96: 

Hello,

There follows a note we have produced to clarify and (hopefully) help people
solve a number of outstanding issues involving printing. We are currently
looking into doing some significant work on the RISC OS printing system, and
it is possible that this work may break or otherwise pessimise the code
relating to any printing metrics other than those described below. As these
pessimisable metrics have effectively been obsoleted by the release of
!Printers 1.52 (issued just over 12 months ago), we are taking this
opportunity to inform you how to ensure that your applications are ready for
our new printing system when it arrives.

Cheers,

Dave

[snip]


Technical Note  11-Nov-96
-------------------------

RISC OS Printing advice for developers
--------------------------------------

Purpose
-------

This note mainly clarifies printing issues already covered in
the PRM, but highlights information from several parts and
volumes for convenience. This note also notifies third parties
of some minor changes that are being made to advice currently
in the PRM. These changes are to allow freedom for more
radical improvements in a future version of Printers.
 
This note affects both applications that print and also third
party printing extensions.

Applications that comply with the advice in this note will offer
maximum performance (speed and quality) from the current version
of Printers, as well as being more ready for future enhancements.


Background
----------

!Printers 1.52 was issued approximately one year ago. This
offered significant enhancements to Acorn supported printers,
while remaining entirely within any printers API defined in
the PRM (mainly, volumes 3 and 5).

The current version of !Printers is 1.53 (disc based), or 1.54
(ROM based) for users of RISC OS 3.7.


Advice
------

1) Available printing modes
---------------------------

Both applications that print and also third party printer dumper
modules should be aware that the lower quality printing
modes (and corresponding dumper strip types) may not be supported
at all. This has been so since !Printers 1.52, but with some
backward compatibility options allowed. In !Printers 1.54 there is
no backward compatibility option.

The reasons for this restriction are to remove low quality printing,
and to allow only the much faster, more sophisticated code
introduced in !Printers 1.52 to run.

Referring to PRM 5a-576, you should now assume that only the following
modes (strip types) are available in general:

  1 grey scale
  3 multiple pass 24 bit colour  (RISC OS 3.1)
  5 single pass 24 bit colour    (RISC OS 3.5 onwards)

This means that applications _must_ be capable of printing colour
properly in modes 3 and 5. The most common issue is with mode 3;
applications _must not_ assume that colour translation tables can
be static for all print rectangles, since mode 3 may be in operation.
Typically, the simple approach is to generate colour tables anew for
each rectangle.

This is not a big change. Firstly, applications should already support
these modes. Secondly, since RISC OS 3.6 colour translation tables
cannot be relied upon generally between rectangles, because of
pre-scanning (see PRM 5a-577).

The version of !Paint used with RISC OS 3.1 is not fully compliant
here, so users have been advised for some time to drop Sprites
into !Draw for printing.


2) Printer definition files and palette files
---------------------------------------------

The format of printer definition files (PDFs) is not defined
in the PRM. Some of the contents of some PDFs are discussed in 
PRM 3-697 onwards, insofar as they relate to !PrintEdit. You should
note that this covers only some bitmap printer language classes, and
that these are dated. !Printers 1.52 onwards already includes some
enhanced PDFs.

The format of printer palette files is not defined in the PRM.
The possibility of editing palette files is mentioned in PRM 5a-579.
You should note that this refers to older format palette files,
not compatible with !Printers 1.52 onwards.

A future version of Printers may enhance PDFs further. It may
also remove palette files altogether, in favour of a compact
parametric specification.

The reason for this clarification is that the current level of
PDFs and the need for palette files may needlessly limit the
enhancements that a future version of Printers could offer.


3) Wimp protocol for printing
-----------------------------

It is _unacceptable_ for any Wimp application to skip the Wimp
protocol stage when initiating printing; PRM 3-558 states that a Wimp
application must use the protocol. Failure to use the protocol means
that the application is incompatible with RISC OS.

Using the RISC OS 2 protocol has been deprecated since RISC OS 3; the
RISC OS 3 protocol has been recommended (see PRM 3-259). You should now
regard the RISC OS 3 protocol as mandatory. In a future version of
Printers, behaviour is _undefined_ if an application attempts to use
the RISC OS 2 protocol.

The reason for this clarification and for the change is that failure
to use the RISC OS 3 protocol breaks the background printing and
queueing system that has been supported since RISC OS 3. Moreover,
future improved methods for background printing, and extra options
such as for network related printing simply will not work if the
prescribed protocols are bypassed.


4) Extensions to the printing system
------------------------------------

Possible extensions to the current printing system fall into two
broad classes. (Some extensions may have components in each class).

The first class consists of extensions to the printer drivers themselves;
typically new dumper modules. This class has a defined API described
in the PRM (PRM 3-553 onwards, Part 9 - Printing).

Extensions restricted to the first class will be relatively easy to keep
compatible with a future version of Printers. (Some work may be required
to take advantage of any API extensions.)

The second class consists of extensions to the printer manager. These
are referred to as 'back ends' to the Printers application in the
PRM (PRM 3-594). This class _does not_ have an API defined in the PRM.

The second class has traditionally relied on internal implementation
details of the printer manager that have so far remained relatively
stable. However, since there is no defined API, use of these details by
third party extensions is subject both to the 'as is' nature of a
current implementation, and to any changes introduced in a future
implementation.

Extensions in the second class may be entirely obsoleted by a future
version of Printers. This is a clarification of the situation since
RISC OS 3.6, rather than a change of policy. PRM 5a-576 states:

  "In RISC OS 3.6, the front and back ends of the Printers application
   have been merged. It is important that any software you write does
   not assume the internal structure of the Printers application,
   as it may change again in subsequent releases of RISC OS."

The structure that may change clearly includes any internal
implementation details.

The reason for this clarification is that a future version of the
Printers manager may be implemented in a radically different way,
and implemented in any language. A new, defined API for manager
extensions may be issued at a later date.


