06-23-2013 04:13 PM
I am having difficulty using QPainter to overlay a Container on an Image, you can run this overlap?
In addition, since they are able to overlay two images I tried to see if it was possible with QPainter to print to a local file of the Container, but without results.
I know that with version 10.2 was introduced class ScreenShot but I'm trying to avoid it.
06-24-2013 08:01 AM
I'm not sure of what you want.
But as QPainter draw on a ImageView, it's not a problem to overlay a container on it within a DockLayout.
What do you mean by "to print to a local file of the Container" ?
06-24-2013 08:30 AM
I'm sorry for my english, I'm using Google Translate.
The correct sentence is:
In addition, since they are able to overlay two images I tried to see if it was possible with QPrinter print the Container in a local file, but to no avail.
Through QPainter I want to paint a Container on an existing image.
Would it be possible to have a link to an example that refers to cases of this kind?
06-24-2013 10:00 AM
QPrinter does not seems to be supported by BlackBerry. Why don't you want to use Screenshot instead?
About QPainter, this worked for me to draw a circle:
QImage image(QSize(100, 100), QImage::Format_ARGB32_Premultiplied); image.fill(QColor(0,0,0,50)); QPainter painter(&image); painter.setPen(Qt::yellow); painter.drawEllipse(50, 30, 30, 30); ImageData pxBuffer = ImageData::fromPixels(image.rgbSwapped().bit
s(), bb::PixelFormat::RGBA_Premultiplied, image.width(), image.height(), image.bytesPerLine()); Image bb10image = Image(pxBuffer); imageView->setImage(bb10image);
06-24-2013 11:41 AM