Article # 296, added by Geoworks, historical record
| first |
previous |
index |
next |
last |
Optimizing graphics in a VisLargeText object.
Q. Now that I know that VisLargeText object make copies from my GStrings I have another question. If I have 100 identical images in one page then there are 100 copies of the image in VisLargeText object's VMFile. Can I optimize so that only one copy of the image exists and there is 100 pointers to that GString? A. VisTextClass already attempts to optimize graphics. If you use the same VisTextGraphic data each time you insert, VisText will simply increment the reference count to the first occurrence of that graphic and not bother copying the new graphic into the text VM file. If you don't have the VisTextGraphic data anymore, you could use MSG_VIS_TEXT_GET_GRAPHIC_AT_POSITION to get the graphic you inserted earlier and get the VisTextGraphic structure. Then you can use this to call MSG_VIS_TEXT_REPLACE_WITH_GRAPHIC again.