Title Banner

Previous Book Contents Book Index Next

Newton Developer Technical Information: Newton Programmer's Guide: 2.1 OS Addendum /
Chapter 3 - Word Processing Views / Word Processing View Reference
Protos / protoTXView


SetDrawOrigin

protoTXView:SetDrawOrigin(origin)

Reconfigures a view for printing.

origin
A point frame with the following two slots:

x The horizontal margin, in pixels.

y The vertical margin, in pixels.

return value
An error code, or nil if the operation worked.

DISCUSSION

For paged layouts, the margins are used for each page. The default margin is (0, 0).

Note
You can call *SetGeometry to reconfigure your view for printing; however, doing so changes your margin settings. If you use *SetDrawOrigin, your margin settings are not affected.
For example, to print the page number n for a view with page height h (including margins) in your PrintNextPageScript, you can call *SetDrawOrigin as follows and then draw the view:

SetDrawOrigin( {x:0, y:n*h} )


Previous Book Contents Book Index Next

© Apple Computer, Inc.
26 APR 1997



Navigation graphic, see text links

Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help