Accessibility of previous pages drawcommands

edited March 2010 in Devices
Hi,

I wanted to know if i create a list with objects that hold pointers to all
the drawcommands for say page 1 during the ReceivePage event, and i then
finish with page 1 and do the ReceivePage for Page 2, will i still have
access to Page 1's draw commands through the pointers? I have tried this
exercise and when i write out Page 1's draw commands to a text file for each
ReceivePage iteration the values change, which tells me that you don't
retain the drawcommands for previous pages? You clear them out and the
producer then repopulates the draw commands for the new page.

I have included a write out of the data that i receive. The list holding
these items is ordered by page number, top and left.

E.g.

TRBDrawItem is a class i created to wrap the draw commands, it has a pointer
to a DrawCommand. In the example it it also just for illustration sake
assumed the draw command is a text command.

Processing Page 1:
RBDrawItem.Page := 1;
RBDrawItem.DrawCommand := APage.DrawCommands[10];
ShowMessage(IntToStr(RBDrawItem.DrawCommand).Left+' /
'+IntToStr(RBDrawItem.DrawCommand).Top) = '15081 / 19844';

Processing Page 2:

GetDrawItemForPage1
ShowMessage(IntToStr(RBDrawItem.DrawCommand).Left+'
'+IntToStr(RBDrawItem.DrawCommand).Top) =
'84931 / 134410'

Comments

  • edited March 2010

    Devices should implement the ReceivePage event to render the Page that is
    passed. For examples of this, see the source code the existing device
    classes.

    Devices should /not/ hold references to Page objects, just process the
    current page. :)



    --
    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com



    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited March 2010
    Ok, so the answer is no then? Or use at own risk?

  • edited March 2010
    "Devices should /not/ hold references to Page objects"

    That means no. :)


    --
    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com



    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
This discussion has been closed.