![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: Copying picture to a canvas Topic Summary: How to copy an Object's picture onto a canvas? Created On: 8-Feb-2008 12:48 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
|
I am looking for a way to copy an Object's static picture (any DOORS supported format) onto a DOORS canvas (DBE). I suspect this would require some bitmap manipulation.
Has anyone found a way to do this? Is it even possible? Edited: 8-Feb-2008 at 13:42 by Joe Sarkic |
|
![]() |
|
![]() |
|
In the help file look for:
loadBitmap drawBitmap destroyBitmap |
|
![]() |
|
![]() |
|
Thanks for the reply Ron, but the loadbitmap function reads from a file, not an Object.
I need to be able to load a picture from within an Object. |
|
![]() |
|
![]() |
|
Then look at:
string exportPicture(EmbeddedOleObject oleObject, string fileName, int format) |
|
![]() |
|
![]() |
|
The exportPicture function only supports PNG output. Once created, the file needs to be converted to BMP format to load back into a canvas. This conversion can be done with a system() call to a conversion program. It's a round-about way, but it does work.
I would prefer to do direct loading onto a canvas from an Object. For BMP format pictures that are imported into an object, they can be loaded onto a canvas directly as follows: if (getPictFormat(current Object) == "BMP") { string bitmapFileName = getPictName(current Object) bitmap(canvasDBE, bitmapFileName, 0, 0) } Other formats seem to need a round-about way as discussed above. |
|
![]() |
|
![]() |
|
The export picture supports other formats depending upon the integer value you give to it.
What better may be asked is why are you sending object to canvas instead of a richtext box? |
|
![]() |
|
![]() |
|
richtext works for OLE objects, but does not seem to accommodate static pictures. In addition, the richtext box only has a vertical scrollbar. For large pictures, need a horizontal scrollbar as well. This is the reason why a canvas was being used in the first place.
Edited: 8-Feb-2008 at 17:28 by Joe Sarkic |
|
![]() |
Telelogic DOORS
» DXL Exchange
»
Copying picture to a canvas
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.