How to detect GMaps drawing manager polygon edit? - drawing

How can I detect the event of polygon edit? When I draw it I have the event polygon complete but when I edit its edges..? I tried with drawingmode_changed but it's not working.

Related

COCOS2DX, Adding Sprite To Parent

I have created the ball sprite as a parent sprite and i need to add a child sprite in all the boundary of the parent sprite. by defaultly the parent image png it take as square shape, But i want to add like circle. What i can do in COCOS2d-X to add child around circle boundry?
Try drawing a circle, you can use this post as reference. This drawn circle has a perfect round boundary. Attach that to your parent circle image (the one with square boundaries) and set it to invisible. Now you can use attach the child sprites to that invisible drawn circle. It will have the illusion that the child sprites are attached to the circle image.

How to enable zooming in QtCharts?

I want to be able to zoom in my QtCharts using the mouse.
The best way to zoom using the mouse would be by drawing rectangles and adjusting the view to the new smaller rectangle.
How Can I implement this in QtCharts?
Highcharts has a very similar example and it looks quite nice:
This functionality is provided by QChartView:
QChartView v;
v.setRubberBand(QChartView::HorizontalRubberBand);
There is also zooming out functionality bound to your mouse:
If the left mouse button is pressed and the rubber band is enabled, ... the rubber band is displayed on the screen. This enables the user to select the zoom area.
Otherwise use the zooming functions in QChart.

transform coordinates in a QQuickPaintedItem

I want to create a plugin which is derived from QQuickPaintedItem where the user can pan and zoom over the painted image.
For zooming I'm using the method setContentsScale. Now I want to transform the anchor of the painted image, so I can panning. is there a solution for this?
greetings

MFC: how to erase a just drawn rectangle

Could somebody tell me how to erase a rectangle that has just been drawn on an image?
In the application, I have an image displayed on a document (MDI application). The user can select a portion of the image. I implemented this feature as letting the user start the selection with a CRectTrackerColor (derived from CRectTracker) object. The selection works fine: a user is able select a rectangle using the mouse. A rubber band rectangle is shown as a feedback. After the user releases the left mouse, the rectangle is colored based on my pen color. Then I present a dialog for OK/Cancel. Upon Cancel, I would like the rectangle to disappear. How should I go about doing that?
Thanks.
Just invalidate that rectangle so it'll get redrawn normally.

How can I draw a selection rectangle on the screen with Qt?

How can I draw a selection rectangle on my screen with Qt in X11?
I want to be able to drag a rectangle on my screen (outside of the application) and then save the whole rectangle.
Thanks in advance.
Part of the solution will involve using the grabWindow() function of QPixmap like so:
QPixmap::grabWindow(QApplication::desktop()->winId());
Qt has an example program for this here.
There rest of the solution, drawing the area to grab, can probably be achieved by either using a full screen transparent window to render a mouse drawn rectangle and then taking the section it outlines from the grabbed desktop image or using a full screen window with the entire grabbed screen painted on it.