-
1. Re: How to get cursor point in document view?
starnight1981 Oct 17, 2010 10:23 AM (in response to starnight1981)This is my code:
ADMBoolean ADMAPI Panel_Symbles::ADMEntryTrackProc(ADMEntryRef inEntry, ADMTrackerRef inTracker)
{
if( sADMTracker->TestAction( inTracker, kADMMouseMovedDownAction ) )
{
char texts[256];
sADMBasic->SetPlatformCursor(staticpluginref,kADMWaitCursorID );}
else if (sADMTracker->TestAction( inTracker, kADMButtonUpAction ) )
{
ADMPoint point;
sADMTracker->GetPoint(inTracker,&point);
// this point is coordinates relative for the inEntry,
//but I want to get cursor point for current
// docment view,because I want create a new art in
//current cursor point;
//how can I do?
}return sADMEntry->DefaultTrack(inEntry,inTracker);
}
-
2. Re: How to get cursor point in document view?
A. Patterson Oct 18, 2010 7:13 AM (in response to starnight1981)AIDocumentView.h has methods for going from pixels to artboard coordinates. If anything has what you need, that would be it.
-
3. Re: How to get cursor point in document view?
starnight1981 Oct 18, 2010 8:28 AM (in response to A. Patterson)There are not any help in AIDocumentView.h
AIDocumentView is used between DocumentView and artboardView
-
4. Re: How to get cursor point in document view?
A. Patterson Oct 18, 2010 11:01 AM (in response to starnight1981)AIDocumentView.h has pixel coordinates -> canvas coordinates, which you'll need. You just need to figure out how to translate from dialog pixels to document view pixels. I've never done it, but presumably there's a relationship of some sort. I know the ADM also has several ways of determing which coordinate system of pixels you're talking to (main dialog & global). If you figure out how to turn document pixels into global, you have a common ground.


