Creating cwgarph annotations with long arrays

I'm trying to display CWShape annotaions using long coordinate arrays (more then 520 coordinates). When I do so, no shape is displayed. The problem can be seen with many shape types (polygon,region,line...). Apperantly there is a limit to the size of the Xcoordinate,Ycoordinate arrays.
Is that true?
any workaround?

Hi,
I created a small VB project showing this problem.
Press the create plot key and then move the cursors
Thank you
Attachments:
integral.vbp ‏1 KB
integral.frm ‏14 KB

Similar Messages

  • How to create an annotation with respect to zoom?

    Hi,
    Does anyone know how to create an annotation withrespect to the zoom of the pageview?
    I already tried this:
    ASFixed zoom = AVPageViewGetZoom(pageView);
    rect->top += ANNOT_HEIGHT;
    rect->top *= zoom;
    rect->bottom = rect->top - ANNOT_HEIGHT;
    rect->bottom *= zoom;
    rect->right += ANNOT_WIDTH;
    rect->right *= zoom;
    rect->left = rect->right - ANNOT_WIDTH;
    rect->left *= zoom;
    This does not work correctly and the annotation is not drawn at all.

    It seems to me that the sequence
    AVPageViewDragOutNewRect
    AVPageViewDeviceRectToPage
    PDPageAddNewAnnot
    should create an annotation of the size and shape of the rectangle drawn out. I am suspicious of the four lines starting
    rect->top += ANNOT_HEIGHT;
    What are they supposed to do?

  • PREL 09 - Creating video's with long blank endings.

    Hi Guys,
    I'm both new to this forum and premier elements 9 but hope you can help.
    I've created a video with a length of 1min 17seconds but everytime I create the video its 1min 17sec of content followed by a further 3 mins of nothing.
    #Can anyone offer any advice on how I may rectify this?
    Thanks
    James

    Thanks for your help Steve, greatly appreciated.
    James

  • Create a line with an array of coordinates of x & y

    Iam trying to create a shape, which is a line containing coordinates of x & y. I searched the java API and don't know which one to use & how to use it. Is it GeneralPath or Line2D? How am I going to use. Can give any example?

    Yes you can use lineTo() to specify the lines but for some reason there is no moveTo() that takes double precision points so you have to use Line2D.
    I also assume your points make up a closed shape since you want to fill it.
              //Polymorphic function used to construct a closed general path shape of lines  from points in a collection
              public static void ConstructClosedPathFromPts(Collection Points, GeneralPath gp)
                   Point2D curPt,prevPt;
                   Iterator it = Points.iterator();
                   gp.reset();
                    prevPt = (Point2D)it.next();
                    //draw lines from previous point to current point:
                    while(it.hasNext())
                         curPt = (Point2D)it.next();
                         gp.append(new Line2D.Double(prevPt, curPt), true);
                         prevPt = curPt;
                    //close the shape:
                    gp.closePath();
               }Here the points are in a Collection object. If you preffer them in an array adjust the code.

  • Create a line with an array of coordinate x and y

    Iam trying to create a shape, which is a line containing coordinates of x & y. I searched the java API and don't know which one to use & how to use it. Is it GeneralPath or Line2D? How am I going to use. Can give any example?

    Basically create a class that implemets Shape and define the methods that are outlined in Shape. A couple of those methods are the following:
    public PathIterator getPathIterator()
    public PathIterator getPathIterator(AffineTransform at)
    {}The first method just returns a PathIterator which lets a Graphics object know about the vertices of your Shape object, the second one returns a rotated version of your shape using an Affine Transformation.
    An Affine Transformation is basically a matrix defining how to change a points position based upon rotation and translation in order to generate a new Point with the new "changed" coordinates.
    You will then have to implement the PathIterator class and define the methods in it so that it "goes through" the points and returns them to the Graphics object as request. I suggest that you download the SDK source code in order to understand how all of this works. If you have more questions, let me know, you can email me at:
    [email protected]
    Hope that helps
    Cheers

  • How can I group two annotations with JavaScript?

    I create two annotations with JavaScript:
    var annot1 = this.addAnnot({
                      page: 0,
                      type: "Square",
                      rect: [150, 150, 180, 180],
                      name: "OnMarketShare",
                      author: "A. C. Robat",
                      contents: "This section needs revision."});
    var annot2 = this.addAnnot({
                      page: 0,
                      type: "Square",
                      rect: [200, 200, 300, 300],
                      name: "OnMarketShare",
                      author: "A. C. Robat",
                      contents: "This section needs revision."});
    How can I group them with JavaScript?

    Can I select them in JavaScript Code?
    like:
    annot1.selected = true;     //wrong JavaScript code.
    annot2.selected = true;     //wrong JavaScript code.
    annot3.selected = true;     //wrong JavaScript code.
    annot4.selected = true;     //wrong JavaScript code.
    If I can do these, I can group them easily : right-click them, and then, click "group" button.

  • I created a playlist with 100 songs.  I want those 100 songs played using the shuffle option.  This no longer works in iTunes version 11.1.5.5  How can I get an entire  playlist to paly one song after another by using the switch option?

    I created a playlist with 100 songs.  I want those 100 songs played using the shuffle option.  This no longer works in iTunes version 11.1.5.5  How can I get an entire  playlist to paly one song after another by using the switch option?

    You're welcome.
    Going back to your original post:
    5) Tried running Itunes in 'safe mode', running itunes as an administrator..nothing.
    Was that iTunes' safe mode as opposed to Windows' safe mode? iTunes safe mode is invoked by holding down CTRL+SHIFT immediately after clicking the icon to launch iTunes and continuing to hold until this message pops up:
    Click continue, then close iTunes and reopen. With luck iTunes now opens normally every time.
    tt2

  • How to create a grid with arrays and booleans?

    As part of a bigger project, I'm trying to create a sub-VI which will allow me to move a "cursor" in a 3x3 array.
    There should be 2 boolean inputs, one for moving down in the array, and the other for moving to the right. Once the edge of the array has been reached, the "cursor" will start back from the beginning.
    I have a vague idea of a 2 dimensional array with LED's. Once "down" has been pressed, the LED corresponding to (0,0) will turn off, turning (0,1) on. Same goes for the "right" button. When "down" is pressed at (0,2), the LED should turn off, and LED (0,0) should turn on.
    I'm sure it has something to do with initializing arrays, but i can't seem to find the right way to do it.
    Any kind of assistance is much appreciated. Thanks!
    Solved!
    Go to Solution.

    Maybe this will help.
    Oh, I just noticed that I could have done the "Clear True" outside of the inner case structure and some other things too, but oh well - it works.
    Help the forum when you get help. Click the "Solution?" icon on the reply that answers your
    question. Give "Kudos" to replies that help.
    Attachments:
    grid_png.vi ‏14 KB

  • How to create a chart with x and y input arrays

    I am trying to create a chart that receives chunks of data from a while loop.  I know how to create a chart in order to append new data points to those points already in the display, but a regular chart doesn't let me specify the x axis data points.  Is there a way to create a chart with x and y array inputs?
    Thanx,
    Tom

    It's called an XY Graph. If you need an XY graph to behave like a chart, look at the shipping example called XY Chart.

  • Create Annotations with 'author' name tool property

    Philip Cord has kindly sent me this code that allows to create annotations with the "Author" tool property (older versions than CS3 couldn't get this on script listener - only on the CS3 script listener).
    Hope it helps anyone like me that can't have access anymore to CS3
    var colour = new SolidColor();
    colour.rgb.hexValue = 'ff00ff';
    selectNote(0);
    colourNote(colour);
    addAuthorToNote("Author Name");
    function colourNote(colour) {
    var Saturation = colour.hsb.saturation;
    var Brightness = colour.hsb.brightness;
    var Hue =colour.hsb.hue;
    var desc = new ActionDescriptor();
    var ref = new ActionReference();
    ref.putEnumerated( stringIDToTypeID('annotation'), charIDToTypeID('Ordn'), charIDToTypeID('Trgt') );
    desc.putReference( charIDToTypeID('null'), ref );
    var desc2 = new ActionDescriptor();
    var desc3 = new ActionDescriptor();
    desc3.putUnitDouble( charIDToTypeID('H   '), charIDToTypeID('#Ang'), Hue );
    desc3.putDouble( charIDToTypeID('Strt'), Saturation );
    desc3.putDouble( charIDToTypeID('Brgh'), Brightness);
    desc2.putObject( charIDToTypeID('Clr '), charIDToTypeID('HSBC'), desc3 );
    desc.putObject( charIDToTypeID('T   '), stringIDToTypeID('annotation'), desc2 );
    executeAction( charIDToTypeID('setd'), desc, DialogModes.NO );
    function selectNote(number) {
    var desc = new ActionDescriptor();
    var ref = new ActionReference();
    ref.putIndex( stringIDToTypeID('annotation'), number );
    desc.putReference( charIDToTypeID('null'), ref );
    try{
    executeAction( charIDToTypeID('Shw '), desc, DialogModes.NO );
    }catch(e){}
    function addAuthorToNote(Author) {
    var desc = new ActionDescriptor();
    var ref = new ActionReference();
    ref.putEnumerated( stringIDToTypeID('annotation'), charIDToTypeID('Ordn'), charIDToTypeID('Trgt') );
    desc.putReference( charIDToTypeID('null'), ref );
    var desc2 = new ActionDescriptor();
    desc2.putString( charIDToTypeID('Athr'),  Author);
    desc.putObject( charIDToTypeID('T   '), stringIDToTypeID('annotation'), desc2 );
    executeAction( charIDToTypeID('setd'), desc, DialogModes.NO );
    function makeAnnotation(X,Y,Width,Height) {
    var desc = new ActionDescriptor();
    var ref = new ActionReference();
    ref.putClass( stringIDToTypeID('annotation') );
    desc.putReference( charIDToTypeID('null'), ref );
    var desc2 = new ActionDescriptor();
    var desc3 = new ActionDescriptor();
    desc3.putUnitDouble( charIDToTypeID('Hrzn'), charIDToTypeID('#Pxl'), X );
    desc3.putUnitDouble( charIDToTypeID('Vrtc'), charIDToTypeID('#Pxl'), Y );
    desc2.putObject( charIDToTypeID('Lctn'), charIDToTypeID('Pnt '), desc3 );
    var desc4 = new ActionDescriptor();
    desc4.putUnitDouble( charIDToTypeID('Hrzn'), charIDToTypeID('#Pxl'), Width );
    desc4.putUnitDouble( charIDToTypeID('Vrtc'), charIDToTypeID('#Pxl'), Height );
    desc2.putObject( charIDToTypeID('Sz  '), charIDToTypeID('Ofst'), desc4 );
    desc2.putEnumerated( stringIDToTypeID('annotType'), stringIDToTypeID('annotType'), stringIDToTypeID('annotText') );
    desc.putObject( charIDToTypeID('Usng'), stringIDToTypeID('annotation'), desc2 );
    executeAction( charIDToTypeID('Mk  '), desc, DialogModes.NO );

    This is a bit more robust (it won't fall over if you have no images open or can't find the corresponding image) I've made it so if you have the thumbnail image open it will find the mannequin image and visa versa. Save the script to your PS scripts directory. In photoshop record an action that uses the script. Stop recording! Then you can run the script as an action.
    app.preferences.rulerUnits = Units.PIXELS;
    if (documents.length == 0)
        alert ("No documents open, dude!")
    else
        var dir1 = "Mannequin";
        var dir2 = "Thumbnails";
        // call the current document
        var tempDoc = app.activeDocument;
        // get the info out of the source doc
        var fileName = tempDoc.name;
        var filePath = tempDoc.path.toString();
        var fileNameAndPath = filePath + '/' + fileName;
        var tempDir = filePath.substring(filePath.lastIndexOf("/") +1, filePath.length);
        var goCode = false;
        var docName = fileName.substring(0,fileName.length -4);
        if (tempDir == dir1)
            var otherImagePath = filePath.substring(0, filePath.lastIndexOf(dir1));
            var tempFile  = decodeURI(otherImagePath + "/" + dir2 + "/" + fileName);
            goCode = true;
        if (tempDir == dir2)
            var otherImagePath = filePath.substring(0, filePath.lastIndexOf(dir2));
            var tempFile  = decodeURI(otherImagePath + "/" + dir1 + "/" + fileName);
            goCode = true;
        if (tempDir != dir1 && tempDir != dir2)
            alert("Cannot find matching image.")
            goCode = false;
        if (goCode)
            //open the other image
            var fileRef = new File(tempFile)
            if (fileRef.exists)
                app.open(fileRef);
            else
                alert("Matching file does not exist.")
    }// end doc check
    Hope this helps.

  • Creating polygons with an array of doubles instead of ints

    Hi,
    I want to create a polygon using:
    Polygon u = new Polygon(xPoints, yPoints, numTs);
    my problem is that my x & y points are stored in double arrays not ints. Is there a way to create a polygon using double arrays instead of ints?
    cheers,
    elmicko

    or cast them as int. imaginr posX, posY, width and height are doubles.
    Rectangle rect = new Rectangle( (int)posX, (int)posY, (int)width,(int)height );or, with an array of doubles:
    Rectangle rect = new Rectangle( (int)array[0], (int)array[1], (int)array[2],(int)array[3] );

  • Add annotations with JavaScript

    Hello,
    I'm currently writing a JavaScript function (that will be executed in a JSP page) to add annotations to PDF files. So far, so good. Actually everything is working as intended except one thing: the position of the annotation. Somehow, it always ends up at position 0,0 (bottom left) of the document with a size of 0, but I know it's there because I can see it in the list of comments. Here is my JavaScript function:
    function annotPdf(src)
         // Create the ActiveXObject
         var pdf = new ActiveXObject('AcroExch.PDDoc');
         // Variables
         var pdfJS;
         var annot;
         var printParams;
         var page;
         var rectSize = new Array();
         // Open PDF
         pdf.Open(src);
         // Determine where to place the annotation
         page = pdf.AcquirePage(0);
         page = page.GetSize();
         rectSize[0] = 25;
         rectSize[1] = page.y - 50;
         rectSize[2] = page.x - 25;
         rectSize[3] = page.y - 25;
         // Get the JSObject
         pdfJS = pdf.GetJSObject();
         // Add the annotation
         pdfJS.addAnnot({page: 0, type: 'FreeText', rect: rectSize, author: 'Automated', contents: 'Test'});
         // Printing
         printParams = pdfJS.getPrintParams();
         printParams.interactive = -1;
         printParams.firstPage = 0;
         printParams.pageHandling = printParams.constants.handling.fit;
         // pdfJS.print(printParams);
         // Save instead of printing for testing
         pdf.Save(1, "C:/Tempo/test.pdf");
         pdf.Close();
    Again, everything works. The annotation is created, but not positioned (as if rect was not doing its job). Now, if I open the same PDF document with Adobe Acrobat 9 and go into the JavaScript Debugger and put:
    this.addAnnot({page: 0, type: 'FreeTest', rect: [25,742,1199,767], author: 'Automated', contents: 'Test'});
    It correctly adds the annotation to the position I want. My theory is that passing an array with Javascript to add an annotation is bugged, because I can do the exact same thing with VB (Pass an array of Integers to rect) and it works perfectly!
    Anyone could help me find a way to make my function work?
    Thanks, Rukk.

    Oops, my bad. It's installed on client not server. My mistake.
    As I said, the ActiveX has no problem to instantiate. That part works. As I said in my first post, I can open my PDF file, add an annotation to it, print it, etc. The problem I have is that I can't decide where to put my annotation (with the rect property). Please refer to my first post.
    Again, thanks for your answer.
    Edit:
    I had to retype it, because when I did copy & paste it added lot of extra blank line (that I wasn't able to delete) and formatting was a bit weird.
    It' a typo.
    Message was edited by: Rukk

  • ORA-02348: cannot create VARRAY column with embedded LOB

    Hi
    This error message I get when I try to create a table from my schema file which has a (sub-) element of type CLOB.
    In my XML document I have an element which needs to become declared a CLOB (because it's > 4000 bytes), in my Schema I define it's element node like:
    <xs:element name="MocovuState" xdb:SQLType="CLOB">
    I can register this Schema file but when I create the table, I get the error:
    ORA-02348: cannot create VARRAY column with embedded LOB
    Does anybody know how to handle this ?
    Marcel

    You need to use the xdb:storeVarrayAsTable="true" schema annotation so that unbounded elements are created at schema registration time as nested tables. Varrays can not contain CLOBs/BLOBS. Use the schema annotation xdb:SQLType="CLOB" to tell Oracle XMLDB to use CLOB storage for the element. See your schema below:
    P.S. XMLSPY is invaluable as it supports Oracle XML Schema annotations.
    <?xml version="1.0"?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xdb="http://xmlns.oracle.com/xdb" targetNamespace="http://www.yourregisteredschemanamespace.com" elementFormDefault="qualified" attributeFormDefault="unqualified" xdb:storeVarrayAsTable="true">
         <xs:element name="nRootNode">
              <xs:complexType>
                   <xs:all>
                        <xs:element name="nID" type="xs:long"/>
                        <xs:element name="nStringGroup" type="nStringGroup" minOccurs="0"/>
                   </xs:all>
              </xs:complexType>
         </xs:element>
         <xs:complexType name="nStringGroup">
              <xs:sequence>
                   <xs:element name="nString" type="nString" minOccurs="0" maxOccurs="unbounded"/>
              </xs:sequence>
         </xs:complexType>
         <xs:complexType name="nString" xdb:SQLType="CLOB">
              <xs:sequence>
                   <xs:element name="nValue" type="nValue" minOccurs="0" xdb:SQLType="CLOB"/>
              </xs:sequence>
              <xs:attribute name="id" type="xs:long" use="required"/>
         </xs:complexType>
         <xs:simpleType name="nValue">
              <xs:restriction base="xs:string">
                   <xs:minLength value="1"/>
              </xs:restriction>
         </xs:simpleType>
    </xs:schema>

  • Java Reflection: Trying to access a constrcutor with an array argument.

    Having some reflection problem... upon reflection maybe I shouldn't use reflection... :-)
    The classes I use to test this are defined as follows:
    class MyTestClass{
      public long[] _array;
      public MyTestClass(long[] array)
        _array = array;
    class MyTestClass2{
      public int[] _array;
      public MyTestClass2(int[] array)
        _array = array;
    class MyTestClass3{
      public String[] _array;
      public MyTestClass3(String[] array)
        _array = array;
    class MyTestClass4{
      public Long[] _array;
      public MyTestClass(Long[] array)
        _array = array;
    }and this is how I try to access it:
      // Only classes that have a constrcutor with a single
      // param which is an array can be used with this method.
      // The class also has to define a public field called "_array"
      // which is of the ssame type as the parameter of the
      // constructor
      public Object getNewInstanceOf(String className)
        // getValues uses reflection to instanciate an array of objects of
        // certain types which are not known to start with, i.e getValues
        // can return Long[] or Integer[] or String[]
        Object[] values = getValues();
        Class myClass = Class.forName(className);
        myClass..getField("_array");
        Class paraClass = field.getType();
         Constructor constructor = myClass
                    .getConstructor(new Class[]{paraClass});
        // the problem occurs here, I think I would have to cast "values" to the
        // proper array type, but don't know how to do this using reflection.
        Object  myInstance = constructor.newInstance(new Object[]{values});
       return myInstance;
      private Object[] getValues()
        // use reflection to create the array
      }and this is the error I get
    java.lang.IllegalArgumentException: argument type mismatch

    we can be much helpfull if we do not know which line excatly throws exception
    normaly stack trace shows the line number so can you re-post your code highlitine the line which throws given exception

  • How Do You Populate A Spark List Control With An Array?

    Hello, all,
    Sorry to come accross so frustrated, but how in the name of God do you populate a Spark list control with the data in an array?  You used to be able to do this with the mx:List control, but the guys developing Flex just had to make things more difficult than they need to be!  I am more of a code purist and prefer doing things the way they have been done for decades, but apparently nothing can ever stay simple!
    I simply want to populate a list control with an array and this shouldn't be rocket science!  I found out that I must use a "collection" element, so I decided that an arrayCollection would be best.  However, after searching Adobe's documentation about arrayCollections, I am lost in a black hole of data binding, extra lines of code just to add a new element, the need to sort it, etc...!
    Here is my code:
    var pendingArray:ArrayCollection = new ArrayCollection();
    for ( var i:int = 0 ; i < queue.length ; i++ )
         var item:UserQueueItem = queue[i] as UserQueueItem ;
         if ( item.status == UserQueueItem.STATUS_PENDING )
         pendingArray.addItem({label:item.descriptor.displayName,descriptor:item.descriptor});
    Here is the relevant MXML:
    <s:VGroup>
         <s:List id="knockingList" width="110" height="100"/>              
    </s:VGroup>
    I'm not getting any errors, but the list is not populating.
    I have seen several examples where the arrayCollection is declared and populated in MXML:
            <mx:ArrayCollection id="myAC">
                <!-- Use an fx:Array tag to associate an id with the array. -->
                <fx:Array id="myArray">
                    <fx:Object label="MI" data="Lansing"/>
                    <fx:Object label="MO" data="Jefferson City"/>
                    <fx:Object label="MA" data="Boston"/>
                    etc...
               </fx:Array>
            </mx:ArrayCollection>
    That may be fine for an example, but I think this is a rare situation.  Most of the time I would image that the arrayCollection would be created and populated on the fly in ActionScript!  How can I do this?
    Thanks in advance for any help or advice anyone can give!
    Matt

    In your post it seemed like you were trying to take care of many considerations at once: optimization, design, architecture.  I would suggest you get something up and running and then worry about everything else.
    If I use data binding, then I will probably have to declare the  arrayCollection as a global variable and then I'll have to write 100 or  so extra lines of code to addItem(), removeItem(), sort(), etc...  It  just seems like too much overhead.
    I believe you may have some misconceptions about databinding in general.  You won't have to make it a global variable and you certainly won't need an extra 100 lines of code.  If you did this forum would be a very , very quiet place.
    I don't want to use data binding because the original array is refreshed  often and there is one function called by an event that re-declares the  arrayCollection each time, populates it with the array, and then sets  it as the list's dataprovider.
    That is the beauty of the ArrayCollection, it can handle the updates to its source Array. I don't know if you need to redeclare the ArrayCollection, resetting the source to the new Array allows everyone involved to keep their references so you don't have to worry about any "spooky" stuff going on.

Maybe you are looking for

  • How do I get a report to stop printing

    After each Word docuement I print a recap page also prints - No matter how many copies of a single document  a recap page for each page prints - If I print a multipage document, a recap page will also print. I'm using an Officejet Pro 8600 (N911g)  -

  • IShuffle out to PA system, some songs mono-ish. . .

    We are running a play with several sound cues, places where sound effects were used and using the iShuffle patched out to the Bose speakers was a great portable way to do that. We just switched to a larger place with an actual PA system and when we u

  • Crossgrade blues

    Hi. I bought off an auction website a set of 5.1 install disks. They arrived today. On the disks is the word; Crossgrade. The 'Installing your software" booklet was also supplied with two FCP 5.1 install codes and a Support ID number. But the package

  • Import PO in INR

    Hi gyes M/s xyz is supplying the items from USA to the Local Dealer in India We want to place On the local dealer The items are imorted items which will be delivered on High Seas Sale basis.to the Local Vendor we Shall be paying all The Customs duty,

  • Where can I find a link to download md5sum

    I was told I needed to download and unpackage md5sum. Can anyone point me to a link where I can dowload the file. I read somewhere it may be a text file and I had to do some manipulation to unpackage it? Thanks Johnny Mac