Jump to content
Developer Wiki and Function Reference Links ×

Push / Pop


Recommended Posts

  • 3 weeks later...

Push/Pop Attrs only keep a few things, mostly related to the Attributes palette, but if you change an attribute that is not covered in Push/Pop Attrs, then you have to get the setting ahead of time, make your changes, then be sure to put it back the way you found it.

Another approach is to use handle-based routines, if one is provided, so that the document attrs are not affected.

I have found that heavy nested use of Push/Pop Attrs can slow a script down anyway, so I usually just set my own attrs when I am finished.

AFAIK, the only settings that are saved and restored in Push/Pop Attrs are:

Boolean textV; // t if picked up from textNode Boolean markV; // t if picked up from markered object ObjectColorType cType; // color record short ppat; // pen pattern short fPat; // fill pattern ByClassFlagsType isByClass; // whether graphic attributes are "by class" LineType lType; // line width-dash TDashPat lDashPat; // dash pattern definition SegStyleType sType; // marker size and placement short tFont; // font number short tSize; // font size in pagespace Style tStyle; // text style Byte tSpace; // text spacing Byte tJust; // text justification Str255 cName; // class name long wBits; // bitfield of which attrs to paste ObjRecHandle dataList; short toolID;

hth...

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...