Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Developer
Innovatology
Posts: 1,280
Registered: ‎03-03-2011
My Device: Playbook, Z10, Q10, Z30 with Files & Folders and Orbit of course

Re: Cascades Custom Painting & Alcoholism

Agreed. Vector graphics are a much needed feature.

 

Also, the ability to override and extend the visual representation and functionality of existing components is a required feature for a modern framework. That means subclassing, not just composition.

 

I understand the technical difficulties caused by the use of a rendering thread, but I rather question that architectural decision. In my opinion, ensuring UI responsiveness is the responsibility (or choice) of the dev, not the framework designer.

Files & Folders, the unified file & cloud manager for PlayBook and BB10 with SkyDrive, SugarSync, Box, Dropbox, Google Drive, Google Docs. Free 3-day trial! - Jon Webb - Innovatology - Utrecht, Netherlands
Developer
shism2
Posts: 246
Registered: ‎12-13-2010
My Device: Not Specified

Re: Cascades Custom Painting & Alcoholism

I agree that more control should of been given to the developer. However, I think TAT was trying to minimize the possibility of UI unresponsiveness and "dumb" down the programming.

Developer
blackqtcoder
Posts: 146
Registered: ‎05-18-2012
My Device: PlayBook & STL100-1 LE Z10 & Dev Alpha C

Re: Cascades Custom Painting & Alcoholism

OpenGL and libimg (especially this last) are very low-level libs. IMHO, Blackberry can't expect many apps if displaying or manipulate a simple image or paint a graphic object is a nightmare (buffers, mask .... what is it?). A ton of devs dont know this things.

 

Canvas API is a MUST.

---------------------------------------------------------------
Leandro Cerdan - Duantox Apps
BlackBerry Elite dev
TapyHold, Built for Blackberry multimedia scrapbook
Developer
peter9477
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10

Re: Cascades Custom Painting & Alcoholism

Relevant to this thread:

 

Post from Anders on the Cascades rendering architecture, mentioning vector stuff at the end: http://devblog.blackberry.com/2012/09/cascades-custom-ui/

 

Using QPainter and QImage (knowledgebase article on how to do this with Cascades):  http://supportforums.blackberry.com/t5/Cascades-Development-Knowledge/Using-QImage-and-QPainter-to-P...


Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Developer
blackqtcoder
Posts: 146
Registered: ‎05-18-2012
My Device: PlayBook & STL100-1 LE Z10 & Dev Alpha C

Re: Cascades Custom Painting & Alcoholism

Thanks Peter. I don't want create custom controls, only a scene canvas :Helpsmilie:

---------------------------------------------------------------
Leandro Cerdan - Duantox Apps
BlackBerry Elite dev
TapyHold, Built for Blackberry multimedia scrapbook
Developer
peter9477
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10

Re: Cascades Custom Painting & Alcoholism

blackqtcoder, I didn't include the "custom controls" link as a solution, but because it relates to this topic and provides a clear explanation of the reasons we don't have what you want yet.

The second link ought to be usable for many people who need "custom painting" (in the title of this thread), though of course only you can judge whether that's useful to you.

Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Developer
blackqtcoder
Posts: 146
Registered: ‎05-18-2012
My Device: PlayBook & STL100-1 LE Z10 & Dev Alpha C

Re: Cascades Custom Painting & Alcoholism

I know, I know. It's only my wishful thinking for my application, but I understand the reasons that blackberry guys explains : the rendering thread may stress app thread. It's clear like water.
---------------------------------------------------------------
Leandro Cerdan - Duantox Apps
BlackBerry Elite dev
TapyHold, Built for Blackberry multimedia scrapbook
Developer
peter9477
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10

Re: Cascades Custom Painting & Alcoholism

blackqtcoder, forgive my not reading back fully, but does the QPainter approach really not work for you? Or was it just a desire to avoid C++ for this stuff and take advantage of the nice Canvas item from Qt 5.0?

I sympathize, by the way. I think of ways to benefit from this stuff in almost every one of my apps. For now, I think I can survive with the QPainter approach though.

Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Developer
blackqtcoder
Posts: 146
Registered: ‎05-18-2012
My Device: PlayBook & STL100-1 LE Z10 & Dev Alpha C

Re: Cascades Custom Painting & Alcoholism

IMHO, QPainter approach works well with statics items, but is limited when you want to do more sophisticated operations on an "item" : adding an edge, for example. With cascades ( c++ or qml) is a bit tricky. QGRAPHICSITEM Class or Canvas in Qt 5.0 would be a desirable feature for improve flexibility of Cascades, I think, but I understand the reasons of BlackBerry boys
---------------------------------------------------------------
Leandro Cerdan - Duantox Apps
BlackBerry Elite dev
TapyHold, Built for Blackberry multimedia scrapbook