GroupBrowser  




Go Back   GroupBrowser > Adobe Product Newsgroups > Adobe Acrobat > Acrobat SDK
User Name
Password
 
 
Thread Tools Search this Thread Display Modes

Re: Draw line using Acrobat SDK
Old 11-21-2008, 09:46 AM #11
Madhav@adobeforums.com
Guest
 
Status:
Posts: n/a
Default Re: Draw line using Acrobat SDK

Thanks Leonard.. for reply
  Reply With Quote

Re: Draw line using Acrobat SDK
Old 11-24-2008, 02:36 AM #12
Madhav@adobeforums.com
Guest
 
Status:
Posts: n/a
Default Re: Draw line using Acrobat SDK

Hi,

How to draw Point, Circle & polygon using Acrobat SDK? please reply... Give me some input to do it...

Thanks in advance..
  Reply With Quote

Re: Draw line using Acrobat SDK
Old 11-24-2008, 06:12 PM #13
Leonard_Rosenthol@adobeforums.com
Guest
 
Status:
Posts: n/a
Default Re: Draw line using Acrobat SDK

Go read up on your geometry and trigonometry. You know how to draw a line, so use that to do the other types of objects....(well, for circle, you'll want to draw curves, but you get the idea)
  Reply With Quote

Re: Draw line using Acrobat SDK
Old 11-25-2008, 01:13 AM #14
Madhav@adobeforums.com
Guest
 
Status:
Posts: n/a
Default Re: Draw line using Acrobat SDK

Thanks Leonard..

This is my Circle draw code.. but it's not working properly..
moveto() and CurveTo() are mwthod it is defined like Draw Curve. please give me some suggestion about it..

ASFixed inCenterX = mediaBox.left;
ASFixed inCenterY = mediaBox.top;
ASFixed inRadius = ASInt32ToFixed(2);

PDEPath mov = MoveTo( inCenterX + inRadius, inCenterY );
PDEContentAddElem(pdeContent, kPDEAfterLast, (PDEElement)mov);
PDEPath rect1 = CurveTo( inCenterX + inRadius, inCenterY + inRadius * ARC_MAGIC, inCenterX + inRadius*ARC_MAGIC, inCenterY + inRadius,
inCenterX, inCenterY + inRadius );
PDEContentAddElem(pdeContent, kPDEAfterLast, (PDEElement)rect1);
PDEPath rect2 = CurveTo( inCenterX - inRadius*ARC_MAGIC, inCenterY + inRadius, inCenterX - inRadius, inCenterY + inRadius*ARC_MAGIC,inCenterX - inRadius, inCenterY );
PDEContentAddElem(pdeContent, kPDEAfterLast, (PDEElement)rect2);
PDEPath rect3 = CurveTo( inCenterX - inRadius, inCenterY - inRadius*ARC_MAGIC, inCenterX - inRadius*ARC_MAGIC, inCenterY - inRadius,inCenterX, inCenterY - inRadius );
PDEContentAddElem(pdeContent, kPDEAfterLast, (PDEElement)rect3);
PDEPath rect4 = CurveTo( inCenterX + inRadius*ARC_MAGIC, inCenterY - inRadius, inCenterX + inRadius, inCenterY - inRadius*ARC_MAGIC,
inCenterX + inRadius, inCenterY );
PDEContentAddElem(pdeContent, kPDEAfterLast, (PDEElement)rect4);
PDEPath close = CloseTo(inCenterX + inRadius, inCenterY );
PDEContentAddElem(pdeContent, kPDEAfterLast, (PDEElement)close);

HOw to draw circle using Acrobat SDK?
Thanks in advance..
  Reply With Quote

Re: Draw line using Acrobat SDK
Old 11-25-2008, 03:04 AM #15
Leonard_Rosenthol@adobeforums.com
Guest
 
Status:
Posts: n/a
Default Re: Draw line using Acrobat SDK

Well, given that you are centering the circle half off the page - I am not suprised it isn't working...
  Reply With Quote

Re: Draw line using Acrobat SDK
Old 11-25-2008, 04:42 AM #16
Madhav@adobeforums.com
Guest
 
Status:
Posts: n/a
Default Re: Draw line using Acrobat SDK

Hi Leonard...

when i click on PDF page, i get x,y coordinate depends on that coordinate i want to draw circle in that position.
may i get solution about it..

How to solve above problem?

Thanks in advance...
  Reply With Quote

Re: Draw line using Acrobat SDK
Old 11-25-2008, 07:03 AM #17
Madhav@adobeforums.com
Guest
 
Status:
Posts: n/a
Default Re: Draw line using Acrobat SDK

Hi Leonard,

How to Draw Circle using Acrobat SDK? I create circle function

PDEPath CurveTo(ASFixed x, ASFixed y, ASFixed x1, ASFixed y1, ASFixed x2, ASFixed y2)
{
PDEPath path = PDEPathCreate();
PDEPathSetPaintOp(path, kPDEStroke);

PDEGraphicState gState = SetGraphicState(ASInt32ToFixed(3),
ASInt32ToFixed(1), ASInt32ToFixed(0), ASInt32ToFixed(0));
PDEElementSetGState((PDEElement) path, &gState, sizeof(PDEGraphicState));

ASFixed pathData[10];
pathData[0] = kPDEMoveTo;
pathData[1] = x;
pathData[2] = y;
pathData[3] = kPDECurveTo;
pathData[4] = x1;
pathData[5] = y1;
pathData[6] = x2;
pathData[7] = y2;
PDEPathSetData(path, pathData, sizeof(pathData));
return path;
}

How to create Circle using above function?
please help...

Thanks in advance...
  Reply With Quote

Re: Draw line using Acrobat SDK
Old 11-25-2008, 07:22 AM #18
Leonard_Rosenthol@adobeforums.com
Guest
 
Status:
Posts: n/a
Default Re: Draw line using Acrobat SDK

you keep asking us to write the code for you...but we don't see you trying to do some research on your problem.

Circles are made up of four curves - so if you have a working curve function (and I am NOT saying you do!) then you just need to put them together...
  Reply With Quote

Re: Draw line using Acrobat SDK
Old 11-25-2008, 07:26 AM #19
Madhav@adobeforums.com
Guest
 
Status:
Posts: n/a
Default Re: Draw line using Acrobat SDK

Thanks a lot Leonard...
  Reply With Quote
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Forum Jump




Microsoft Newsgroups 1 | Software Newsgroups


Powered by: vBulletin Version 3.0.7
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
© 2003-2004 All Rights Reserved GroupBrowser LLC.