Home » U++ Library support » RichText,QTF,RTF... » QtfRichObject problem
Re: QtfRichObject problem [message #9146 is a reply to message #9132] |
Wed, 18 April 2007 22:43 |
|
mirek
Messages: 13975 Registered: November 2005
|
Ultimate Member |
|
|
DuncanShortland wrote on Wed, 18 April 2007 07:38 | The application is too big but I have modified QtfDrawing to give the same effect.
I am sure it is the pict which needs to be an array.
The last contents (red) is used to display the image as it is the same one.
However the class/struct will not allow blank creation and dynamic setting.
Any suggestions?
|
Use Array:
#include <CtrlLib/CtrlLib.h>
using namespace Upp;
Color col[] = {Yellow, Blue, Green, Red};
#define MAX 4
GUI_APP_MAIN
{
String qtf;
Array<QtfRichObject> o;
for(int i = 0; i < MAX; i++) {
DrawingDraw dw(100, 100);
dw.DrawRect(0, 0, 100, 100, White);
dw.DrawEllipse(10, 10, 80, 80, Red, 5, Blue);
dw.DrawRect(50, 50, 50, 50, col[i]);
o.Add(QtfRichObject(CreateDrawingObject(dw.GetResult(), Size(1000, 1000), Size(1000, 1000))));
qtf << "[A6 This is some drawing in QTF: " << i << o.Top() << "&";
}
PromptOK(qtf);
}
BTW, please, if possible, upload really the whole package packed as .zip, it saves the time of reproducing the rest.
Mirek
|
|
|
Goto Forum:
Current Time: Mon Apr 29 17:03:53 CEST 2024
Total time taken to generate the page: 0.02832 seconds
|