Pan | Zoom: how to get image offsets when panning

Hello,
I am trying to use the Pan | Zoom control to show images, allowing zoom and pan. I haven't found yet a way to infer the X,Y offset of the part of the image that it's displayed in the imageviewer visible rectangle. I need these details in order to print objects and markers at the right place over the image.
Is there some hidden or simple way to get these informations?
Thanks,
   Mario

Hello,
I am trying to use the Pan | Zoom control to show images, allowing zoom and pan. I haven't found yet a way to infer the X,Y offset of the part of the image that it's displayed in the imageviewer visible rectangle. I need these details in order to print objects and markers at the right place over the image.
Is there some hidden or simple way to get these informations?
Thanks,
   Mario

Similar Messages

  • Xml: how to get node value when pasing node name as a parameter

    Hi,
    I've got some xml:
    var xmlData:XML =
    <1stNode>
        <buttonID>first child node value</buttonID>
        <imageID>second child node value</imageID>
        <labelID>third child node value</labelID>
    </1stNode>
    Then I want to read specific node value based on a value passed to a function. .
    var buttonID = new Button;
    var imageID = new Image;
    var labelID = new Label;
    getNodeValue(buttonID); //the value here is set dynamically
    private function getNodeValue (nodeName:String):void {
    trace (xmlData.nodeName)                      //doesn't work
    var str:String = "xmlData." + nodeName;
    var xml:XMLList = str as XMLList             //doesn't work
    I'm don't know how to get the value when node name is dynamically changed.

    use:
    getNodeValue(buttonID); //the value here is set dynamically
    private function getNodeValue (nodeName:String):void {
    trace (xmlData[nodeName])                    

  • How to get the path when i select a directory or a file in a JTree

    How to get the path when i select a directory or a file in a JTree

    import java.lang.*;
    import java.io.*;
    import javax.swing.*;
    import javax.swing.tree.*;
    import java.awt.HeadlessException;
    import javax.swing.event.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.util.Iterator;
    * @author Frederic FOURGEOT
    * @version 1.0
    public class JTreeFolder extends JPanel {
    protected DefaultMutableTreeNode racine;
    JTree tree;
    protected JScrollPane scrollpane;
    final static int MAX_LEVEL = 1; // niveau max de descente "direct" dans l'arborescence
    * Sous-classe FSNode
    * @author Frederic FOURGEOT
    * @version 1.0
    private class FSNode extends DefaultMutableTreeNode {
    File file; // contient le fichier li� au noeud
    * Constructeur non visible
    private FSNode() {
    super();
    * Constructeur par initialisation
    * @param userObject Object
    FSNode(Object userObject) {
    super(userObject);
    * Constructeur par initialisation
    * @param userObject Object
    * @param newFile File
    FSNode(Object userObject, File newFile) {
    super(userObject);
    file = newFile;
    * Definit le fichier lie au noeud
    * @param newFile File
    public void setFile(File newFile) {
    file = newFile;
    * Renvoi le fichier lie au noeud
    * @return File
    public File getFile() {
    return file;
    public JTree getJTree(){
         return tree ;
    * Constructeur
    * @throws HeadlessException
    public JTreeFolder() throws HeadlessException {
    File[] drive;
    tree = new JTree();
    // cr�ation du noeud sup�rieur
    racine = new DefaultMutableTreeNode("Poste de travail");
    // cr�ation d'un noeud pour chaque lecteur
    drive = File.listRoots();
    for (int i = 0 ; i < drive.length ; i++) {
    FSNode node = new FSNode(drive, drive[i]);
    addFolder(drive[i], node); // on descend dans l'arborescence du lecteur jusqu'� MAX_LEVEL
    racine.add(node);
    // Gestion d'evenement sur JTree (on �coute les evenements TreeExpansion)
    tree.addTreeExpansionListener(new TreeExpansionListener() {
    public void treeExpanded(TreeExpansionEvent e) {
    // lorsqu'un noeud est ouvert
    // on descend dans l'arborescence du noeud jusqu'� MAX_LEVEL
    TreePath path = e.getPath();
    FSNode node = (FSNode)path.getLastPathComponent();
    addFolder(node);
    ((DefaultTreeModel)tree.getModel()).reload(node); // on recharche uniquement le noeud
    public void treeCollapsed(TreeExpansionEvent e) {
    // lorsqu'un noeud est referm�
    //RIEN
    // alimentation du JTree
    DefaultTreeModel model = new DefaultTreeModel(racine);
    tree.setModel(model);
         setLayout(null);
    // ajout du JTree au formulaire
    tree.setBounds(0, 0, 240, 290);
    scrollpane = new JScrollPane(tree);
         add(scrollpane);
         scrollpane.setBounds(0, 0, 240, 290);
    * Recuperation des sous-elements d'un repertoire
    * @param driveOrDir
    * @param node
    public void addFolder(File driveOrDir, DefaultMutableTreeNode node) {
    setCursor(new Cursor(3)); // WAIT_CURSOR est DEPRECATED
    addFolder(driveOrDir, node, 0);
    setCursor(new Cursor(0)); // DEFAULT_CURSOR est DEPRECATED
    * Recuperation des sous-elements d'un repertoire
    * (avec niveau pour r�cursivit� et arr�t sur MAX_LEVEL)
    * @param driveOrDir File
    * @param node DefaultMutableTreeNode
    * @param level int
    private void addFolder(File driveOrDir, DefaultMutableTreeNode node, int level) {
    File[] fileList;
    fileList = driveOrDir.listFiles();
    if (fileList != null) {
    sortFiles(fileList); // on tri les elements
    // on ne cherche pas plus loin que le niveau maximal d�finit
    if (level > MAX_LEVEL - 1) {return;}
    // pour chaque �l�ment
    try {
    for (int i = 0; i < fileList.length; i++) {
    // en fonction du type d'�l�ment
    if (fileList[i].isDirectory()) {
    // si c'est un r�pertoire on cr�� un nouveau noeud
    FSNode dir = new FSNode(fileList[i].getName(), fileList[i]);
    node.add(dir);
    // on recherche les �l�ments (r�cursivit�)
    addFolder(fileList[i], dir, ++level);
    if (fileList[i].isFile()) {
    // si c'est un fichier on ajoute l'�l�ment au noeud
    node.add(new FSNode(fileList[i].getName(), fileList[i]));
    catch (NullPointerException e) {
    // rien
    * Recuperation des sous-elements d'un noeud
    * @param node
    public void addFolder(FSNode node) {
    setCursor(new Cursor(3)); // WAIT_CURSOR est DEPRECATED
    for (int i = 0 ; i < node.getChildCount() ; i++) {
    addFolder(((FSNode)node.getChildAt(i)).getFile(), (FSNode)node.getChildAt(i));
    setCursor(new Cursor(0)); // DEFAULT_CURSOR est DEPRECATED
    * Tri une liste de fichier
    * @param listFile
    public void sortFiles(File[] listFile) {
    triRapide(listFile, 0, listFile.length - 1);
    * QuickSort : Partition
    * @param listFile
    * @param deb
    * @param fin
    * @return
    private int partition(File[] listFile, int deb, int fin) {
    int compt = deb;
    File pivot = listFile[deb];
    int i = deb - 1;
    int j = fin + 1;
    while (true) {
    do {
    j--;
    } while (listFile[j].getName().compareToIgnoreCase(pivot.getName()) > 0);
    do {
    i++;
    } while (listFile[i].getName().compareToIgnoreCase(pivot.getName()) < 0);
    if (i < j) {
    echanger(listFile, i, j);
    } else {
    return j;
    * Tri rapide : quick sort
    * @param listFile
    * @param deb
    * @param fin
    private void triRapide(File[] listFile, int deb, int fin) {
    if (deb < fin) {
    int positionPivot = partition(listFile, deb, fin);
    triRapide(listFile, deb, positionPivot);
    triRapide(listFile, positionPivot + 1, fin);
    * QuickSort : echanger
    * @param listFile
    * @param posa
    * @param posb
    private void echanger(File[] listFile, int posa, int posb) {
    File tmpFile = listFile[posa];
    listFile[posa] = listFile[posb];
    listFile[posb] = tmpFile;

  • I cannot see my Iphone 4 in my device window in the finder anymore.  It use to appear so I could copy the camera pictures off of it and transfer them to other folders.  Does anyone have and idea how to get it back when you plug it in initially.  Thanks

    I cannot see my Iphone 4 in my device window in the finder anymore.  It use to appear so I could copy the camera pictures off of it and transfer them to other folders.  Does anyone have and idea how to get it back when you plug it in initially.  Thanks

    You will want to open iPhoto, go to the iPhoto menu and select Preferences. Under the General tab, next to Connecting camera opens: select iPhoto. Close the preferences and quit iPhoto. Reconnect your iPhone 4. iPhoto should open automatically and offer to import your pictures. Import them and then do what you want with them.
    Best of luck.

  • How to get a confirmation when your email is delivered or read  ?

    With Mail app ,How to get a confirmation when your email is delivered or read?

    When I send mail with Mail app , there is flying letter pops up. But now I could not see anymore. Do you know how can I active that animation ?
    Thanks for your help

  • How to get image using Http and how to save in Smulator

    Hi guys,
    Am working in black berry bold. i dont know how to get image using htp connection and one more thing i need to save this image in side simulator directory............. what are the specific API i should...
    Guide me.........

    If you want the input image size you need to pass it in as parameters.
    A discussion thread on this topic is:
    http://forums.adobe.com/thread/29948
    -- Daniel R. <[email protected]> http://danielr.neophi.com/

  • How to get Image size?

    Hello,
    I need help for getting Image size, when i am using JAI.
    for example:
    RenderedImage img = JAI.create("url", url);
    If you could help me than please.
    Thanks
    bye
    Jarrar.

    img.getHeight();
    img.getWidth();

  • How to get image RGB/16???????? (cont)

    VRect currentRect;
    int32 progressTotal = tilesVert * tilesHoriz;
    int32 progressDone = 0;
    // process each tile in order
    currentRect.top = 0;
    currentRect.left = 0;
    currentRect.bottom = tileHeight;
    currentRect.right = tileWidth;
    // don't go past the document bounds
    if (currentRect.bottom > docHeight)
    currentRect.bottom = docHeight;
    if (currentRect.right > docWidth)
    currentRect.right = docWidth;
    pixelMemoryDesc.rowBits = (currentRect.right - currentRect.left) *
    readChannelDesc->depth;
    // read
    while(readChannelDesc != NULL)
    bigError = sPSChannelProcs->ReadPixelsFromLevel(
    readChannelDesc->port, 0, &currentRect, &pixelMemoryDesc);
    if (bigError)
    error = filterBadParameters;
    throw(this);
    unsigned char *imageData;// for image RGB/8, with RGB/16 is unsigned short
    long temp = tileHeight * tileWidth * readChannelDesc->depth/8;
    imageData = new unsigned char[temp];// for image RGB/8, with RGB/16 is unsigned short
    memcpy(imageData, pixelMemoryDesc.data, temp);
    FILE *file;
    file = fopen("C:\\abc.txt", "ab");
    if(file == NULL)
    return;
    fwrite(imageData, sizeof(unsigned char), temp, file);// for image RGB/8, with RGB/16 is unsigned short
    fclose(file);
    readChannelDesc = readChannelDesc->next;
    return;
    ////end of customizing/////
    - then we use a project to read "abc.txt" to get image:
    ////////// function of button that is clicked, the image is shown
    void CPixelDlg::OnBtnSetPixel()
    // TODO: Add your control notification handler code here
    // POINT point;
    unsigned char*memblock;// for image RGB/8, with RGB/16 is unsigned short
    memblock = new unsigned char[HEIGH * WIDTH *3];// HEIGH , WIDTH is assigned by hard code// for image RGB/8, with RGB/16 is unsigned short
    FILE *file;
    file = fopen("C:\\abc.txt", "rb");
    if( file == NULL)
    return;
    else
    fread(memblock, sizeof(unsigned char), HEIGH * WIDTH *3, file);// for image RGB/8, with RGB/16 is unsigned short
    fclose(file);
    CClientDC dc(this);
    int i = 0;
    int j=0;
    int k = 0;
    for( i = 0; i < WIDTH; i++)
    for( j = 0; j < HEIGH; j++)
    if (k>WIDTH*HEIGH*3-3)
    break;
    dc.SetPixel(j, i, RGB(memblock[k],memblock[k+WIDTH*HEIGH],memblock[k+2*WIDTH*HEIGH]));
    k+=1;
    2. that code is ok for Image RGB/8. But with image RGB/16, now we don't know how Photoshop stores image data, and how to get image data to show???
    Please help me?
    Thanks,

    Use ResultSet.getBinaryStream()

  • How to get the tab when is it pressed?

    I have the following situation:
    I have an array of JTextField inside a scroollpane. The size of my array is nine or ten depends on some rules. But my window show just four JTextField. So I would like to know how to get the event when I press "tab", just to show the others JTextField while I'm pressing "tab". Because I need this event to scrooll down or scrooll up.
    I tried the keylistener, but when I press "tab" any method(keypressed, keyreleased, keytyped) is called.
    I also tried the focuslistener. If this event I could scrooll down or scrooll up, but I couldn't do both!!
    Can somebody help me??
    Thanks anyway!!
    Gin

    JTextField implements Scrollable interface, which provides information to the enclosing container such as JScrollPane.
    Hence when the tab event is fired, you can compute the Rectangle area that should be visible and then call the 'scrollRectToVisible()' method in JTextField. This will inform the JScrollPane to scroll to the rectangle that you mention.
    HTH

  • How to get an email when data got inserted

    Hi All,
    Could you please let me know how to get an email when data got inserted into table by using sql/plsql
    Thanks in adavance

    Could you please let me know how to get an email when data got inserted into table by using sql/plsql
    Well that seems pretty straightforward - write some pl/sql to send you an email when that pl/sql inserts data into a table.
    See this Oracle-base article for an example of sending mail.
    http://www.oracle-base.com/articles/misc/email-from-oracle-plsql.php
    Post what you have tried so far. What part of what you have tried doesn't seem to be working?

  • How to get full URL when LoaderInfo.isURLInaccessible == true?

    Why is Flash Security so hard to figure out?
    I am trying to load an image; however, the image URL I 1st receive is actually a redirected URL. I wish to load the redirected URL, but I can't get the full redirected URL because LoaderInfo.isURLInaccessible is true even though I think I follow all the precautions detailed on the following page:
    http://www.macromediademos.com/devnet/flashplayer/articles/fplayer10.1_air2_security_chang es.html
    Here is my sitaution...
    I have an image URL: i.e. "http://www.foo.com/image.jpg"
    I attempt to load the image ensuring that I set the LoaderContext's checkPolicyFile to "true"
                    var ur:URLRequest = new URLRequest( "http://www.foo.com/image.jpg");
                    var l:Loader = new Loader();
                    l.contentLoaderInfo.addEventListener(Event.COMPLETE, onLoad);
                    var lc:LoaderContext = new LoaderContext();
                    lc.checkPolicyFile = true;
                    l.load(ur, lc);
    When the Event.COMPLETE is dispatched, I discover that the loaded image's URL is not the one I first used ( "http://www.foo.com/image.jpg") instead the URL is a redirected URL  "http://www.bar.com/image.jpg".
    Because of sandbox issues, I can not use the loaded image and be able to manipulate the image. So instead I need to reload the image using the final URL. However, I cannot determine what the redirected URL is because the LoaderInfo.isURLInaccessible == true and LoaderInfo.url =="http://www.bar.com/", not "http://www.bar.com/image.jpg".
            private function onLoad(e:Event):void {
                   var li:LoaderInfo = LoaderInfo(e.target);
                   trace("isURLInaccessible = " + li.isURLInaccessible); //output = "isURLInaccessible = true"         
                   trace("li.url  = " + li.url); //output = "li.url = http://www.bar.com/"
    Acording to the Adobe Blog post (see URL above), I need to ensure two things: 1) LoaderContext.checkPolicyFile= true, and 2) the crossdomain policy file gives the proper permission.
    I think I've met both o these criteria. The crossdomain file for BOTH http://www.foo.com/crossdomain.xml and http://www.bar.com/crossdomain.xml is the following:
         <cross-domain-policy>
              <allow-access-from domain="*"/>
              <site-control permitted-cross-domain-policies="all"/>
         </cross-domain-policy>
    What am I doing wrong? How do I ensure that I can get the redirected URL and LoaderInfo.isURLInaccessible == false?
    thanks!

    Here's an update. (though still no solution.)
    1) I preloaded ANY image from the redirected server: i.e. http://www.bar.com/image123.jpg. (Mind you, I did nothing with this preloaded image.) When I loaded this image, checkPolicyFile == true.
    2) A few seconds later, I loaded the desired non-redirected image: http://www.foo.com/image.jpg.
    3) This time, isURLInaccessible was true and I had access to the full redirected URL: i.e. http://www.foo.com/image.jpg.
    Please note that the image from the 1st step didn't have to be the same image from the 3rd step.
    It appears that you have to check the policy file on the redirected URL before have knowledge of the redirected URL. However, how can you check the policy file on the redirected URL if you don't know the redirected URL yet?
    Ah, Adobe Flash security makes so much sense and is always so simple. /sarcasm
    So does anyone know how to properly check the policy file for redirected images with this new info?
    Seemingly according to the security page written by Adobe which I linked to my 1st post, it should be as simple as setting the checkPolicyFile property of the LoaderContext. I've tried that and that doesn't work. So either Adobe's page is incorrect (perhaps) or is not clear (most likely).
    Unless anyone can come up with a simpiler way to do this, I'll probably do the following which theoretically should work:
    1) load the non-redirected image
    2) when image loads, determine if the loaded URL == the URL originally used to load the image
    3) If it is determined that the loaded URL is a redirected URL, then check if isURLInaccessible  == true.
    4) if isURLInaccessible  == true, then somehow load the policy file from the incomplete URL (I will need to figure out how to do this.)
    5) Once the policy file loads, then go back to step #1. When the process reaches step #4, then isURLInaccessible should be false at which case, process to step #6
    6) Load the redirected image URL
    The above seems like a lot steps to load an image. Can someone confirm if the above is necessary or if there is a simpler way to load the redirected image's policy file?

  • How to Get checkbox value when List value changed in classic report

    hi ,
    i worked with apex 4.2 and i create normal classic report with one checkbox column and one column change it to select list(named loved) now i want when user change list
    take value of checkbox item and show it in message .
    SQL for report
    SELECT
    '<INPUT TYPE="checkbox" NAME="f01" VALUE="'
    ||SEQ
    ||'">' SEQ,
    ID,
    DEPT_NO,
    EMP_NAME} i change the column attributes of Dept_NO to Display as Select list of department name (named lov).
    now i want when user change name of department the value of SEQ SHOW IN ALERT MESSAGE
    i create JavaScript on the page
    function test(pThis) {
    var f01_value = $('select[name="f01"]').value;
    alert('#SEQ : '+ f01_value);
    </script>
    I call this javascript function when list change but the value undefined..
    My Question :
    How can get this value Or any value of item in reports
    regards
    Ahmed

    Hi Ahmed,
    >
    i worked with apex 4.2 and i create normal classic report with one checkbox column and one column change it to select list(named loved) now i want when user change list
    take value of checkbox item and show it in message .
    SQL for report
    SELECT
    '<INPUT TYPE="checkbox" NAME="f01" VALUE="'
    ||SEQ
    ||'">' SEQ,
    ID,
    DEPT_NO,
    EMP_NAME} i change the column attributes of Dept_NO to Display as Select list of department name (named lov).
    >
    You should not create checkboxes like this. Either use the APEX_ITEM.CHECKBOX2 API or change the Column Type to Simple Checkbox.
    >
    now i want when user change name of department the value of SEQ SHOW IN ALERT MESSAGE
    i create JavaScript on the page
    function test(pThis) {
    var f01_value = $('select[name="f01"]').value;
    alert('#SEQ : '+ f01_value);
    </script>
    >
    name="f01" returns an array, what you need is single element value.
    Try
    <script type="text/javascript>
    function test(pThis) {
      var f01_value = $v(pThis);
       alert('#SEQ : '+ f01_value);
    </script>
    {code}
    {quote}
    I call this javascript function when list change but the value undefined..
    My Question :
    How can get this value Or any value of item in reports
    {quote}
    Depends in how you are invoking/triggering the change event. Are you using DA or have you written an "onchange" event on the element?
    Cheers,                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • How to get swoosh sound when mail gets sent

    How to get the swoosh sound back when mail gets sent?

    I'm talking about my iMac desktop. I have OSX 10.9.5. I used to hear the swoosh sound when I sent an e-mail. Suddenly it's gone, and I can't find out how to get it back. I miss it!

  • How to get the offset value in the Bex customer exit?

    Hello Friends,
    I have defined an offset on a variable in the query definition.
    I wish to capture this offset value  in the Bex variable customer exit .
    Does anyone how to get this??
    Thanks,
    Gautam

    I dont think you can capture the offset applied value in a exit as the value is dependent on the variable itself and nothing to capture the result after the offset has been applied.
    why dont you capture the variable value itself and apply the logic to do an offset in the customer exit?

  • How to get image properties in PDF using javascript or plug ins

    Hi
    How to get the image(all the images) properties in PDF using javascript or suggest plug ins
    Thanks in Advance

    HI,
    In the PDF Edit API's ( as has already been suggested) there is the PDEImage and using this you should be able to find out everything you need to know about any image in a PDF file.
    I would recommend starting with PDEImageGetAttrs
    Hope this helps
    Malcolm

Maybe you are looking for

  • How to open my apple formatted external hard drive in my pc?

    Hi guys. I have [or had...] an Australian Imac 27". I do not have the specifications now because the computer died last night. I was working and than suddenly everything slowed down. I tried to open Itunes and icon became an interrogation mark after

  • File Size

    I'm trying to open a .mov file in imovie but it says there's not enough disK space. There is plenty of space so what is th problem?

  • TOOL WINDOWS PALETTE showing only pen icon at start up

    My tool palette often has every tool icons in it disapear except the PEN tool. The way I've found to make them re-appear is to unattach palette (tool icons re-appear) then replace my tool palette wherre it was. But, it'S a neverending process everyti

  • Drill Through Parameters

    Hello, Our organization would like to take advantage of the Drill Through functionality that is built into BPC for NetWeaver 7.5.  In both the How To Guide and several blog/forum posts, the examples shown for the parameterized URL call state that the

  • Make a dynamic menu using JSP or Javascript

    Hi , I am trying to make a dynamic menu that is using data retrieved from database in the form of a list. I have a javascript to make a tree structure menu, but i need to iterate through the list i am reciveing from the database to make the tree stru