Featured post
Drawing atop a scrollable, zoomable image in Qt -
i'm sorry if question vague. it's been few years since did qt, , never did fancy image stuff. i'm asking below general suggestions on classes consider using. i'm trying avoid barking wrong tree start.
the situation: i'm writing qt-based program in need display large (let's 5000x5000) raster image. user should able zoom (quickly) in , out, , pan around image in way similar example google maps. far, not different the qt imageviewer example, except perhaps requirement zooming happens quickly. however, need draw on order of 50k simple geometric shapes (let's circles) on top of image, , able add , remove of these in simple way. circles should have same size no matter zoom level, , should either redrawn whenever user zooms, or should drawn vector graphics. think of circles map annotations. these should same @ zoom level, , behave nicely respect panning.
i guess question twofold:
- can qt draw vector graphics on top of raster image?
- in general, classes should consider above?
thanks in advance. don't answering vague questions myself, maybe experience qt's graphics capabilities has answer.
i suggest use qgraphicsview , friends this. helps handling view/world transformation , vector items can achieved various qgraphicsitems.
you can change sizes of items whenever zoom level changes maintain constant apparent sizes.
- Get link
- X
- Other Apps
Comments
Post a Comment