How I can draw Line in geographic map

Hi
I work with GPS Tracking System and I want display car movement from start position to end position
I want draw the line like Google Earth .
can you tell me

Hi
How I can deal with map in jdeveloper like in Application Server because i want make like
car move in Mapviewer demo in oc4j10g?
can you tell me

Similar Messages

  • How to insert new line break in XSLT mapping

    Hi experts,
    I am doing file to mail scenario, i am sending the text file as an attachment using reciever mail adapter.
    I did everything, i can able to send the mail with text file attachment, but with in the file i got multiple rows, i need to put line break in XSLT mapping.
    I did use following statement but it is inserting small rectangle between the records, the records are not separating with new lines, all are in one line.
    <xsl:text>*#xA;</xsl:text>   
    note: in real coding replace * with &
    Can anyone suggest me how to insert new line in XSLT mapping.
    My XSLT mapping as look like:
    <?xml version='1.0'?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:ns0="http://www.Coj.co.za/SapIsuToABSA/DirectDebitFile">
    <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
    <xsl:variable name="break">&lt;br/&gt;</xsl:variable>
    <xsl:variable name="space"> </xsl:variable>
    <xsl:variable name="newline"><xsl:text></xsl:text></xsl:variable>
    <xsl:template match="/">
    <ns1:Mail xmlns:ns1="http://sap.com/xi/XI/Mail/30">
    <Subject>Please Check Attached Direct Debit File</Subject>
    <From>S@za</From>
    <To>P@za</To>
    <Content_Type>text/plain</Content_Type>
    <Content>
    <xsl:for-each select="MT_SapIsuToABSA_DirectDebitFile/DirectDebitRec/Body">
    <xsl:value-of select="Space1"/>
    <xsl:value-of select="Cust_AccNo"/>
    <xsl:value-of select="Reserve_1"/>
    <xsl:value-of select="Cust_Name"/>
    <xsl:value-of select="Cust_Name1"/>
    <xsl:value-of select="Cust_Bank_AccNo"/>
    <xsl:value-of select="Space2"/>
    <xsl:value-of select="Cust_Bank_BranchNo"/>
    <xsl:value-of select="Reserve_2"/>
    <xsl:value-of select="Space3"/>
    <xsl:value-of select="Cust_AccNo_1"/>
    <xsl:value-of select="Space4"/>
    <xsl:value-of select="Reserve_3"/>
    <xsl:value-of select="Deduction_Amnt"/>
    <xsl:value-of select="Space5"/>
    <xsl:value-of select="Reserve_4"/>
    <xsl:value-of select="Space6"/>
    <xsl:value-of select="Action_Date"/>
    <xsl:value-of select="Space7"/>
    <xsl:value-of select="Reserve_5"/>
    <xsl:text>*#xA;</xsl:text>   
    note: in real coding replace * with &
    </xsl:for-each>
    </Content>
      </ns1:Mail>
      </xsl:template>
      </xsl:stylesheet>
    Kind regards,
    Praveen

    Hi,
    I think <xsl:text>#xa;</xsl:text> should do the trick, but depending on which OS (ux or win), the "new line" chars sequence is different (win would require a CRLF like <xsl:text>#xd;*#xa;</xsl:text>)
    Chris
    -> &
    Edited by: Christophe PFERTZEL on Apr 14, 2010 2:16 PM

  • Draw Line

    I want a motion tween to draw a line in front of the viewer? how is that done?
    I can draw lines, just can't seem to draw in as a tween

    nzkiwis I'm not sure if you mean to create a line drawing animation that shows process of the line drawn.
    If it is a straight line, you can create motion tween of the line.
    If it is curved, then you might need it to be frame by frame.

  • How i can send measurment reading to excel sheet?

    q.1: i have some readings and i want to send them to excel sheet
    q.2: how i can draw a gragh for these readings?
    Solved!
    Go to Solution.
    Attachments:
    Temp.vi ‏59 KB

    You can do this directly like this right?
    Attachments:
    gr.vi ‏12 KB

  • I would like to cut and paste information from a word file onto a pdf file, as well as draw lines onto the pdf file.  How can I accomplish that task?  Is there software I can purchase?

    I would like to cut and paste information from a word file onto a pdf file, as well as draw lines onto the pdf file.  How can I accomplish that task?  Is there software I can purchase?

    Hi jgallu7382,
    The latter is easily accomplished using the Drawing Markup tools, which are available in both the free Adobe Reader, and in Acrobat. Copying/pasting text into the PDF is something that you could do using the editing tools that are available only in Acrobat. Note, however, that Acrobat isn't intended to be a text-editing application, so editing there won't be as robust as in an application designed specifically for that purpose. (It's also worth mentioning that you won't be able to alter a PDF if it has document permissions applied that would prevent you from doing so.)
    I hope that answers your questions.
    Best,
    Sara

  • How can get a Graphics to draw line on screen?

    How can get a Graphics to draw line on screen?
    Now, I can get a Graphics to draw line based on component. For example JPanel, but I want to get a Graphics to draw line on screen.

    By drawing on the screen, I assume you mean drawing outside the bounds of a top-level window like
    JFrame or JDialog. You can't do that. At least, without going native and even then that's a dodgey thing
    for any platform to let you do. One thing you can do is simulate it with a robot's screen capture:
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.image.*;
    import javax.swing.*;
    public class X {
        public static void main(String[] args) throws Exception {
            Rectangle bounds = GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds();
            BufferedImage image = new Robot().createScreenCapture(bounds);
            Graphics2D g2 = image.createGraphics();
            g2.setStroke(new BasicStroke(20));
            g2.setPaint(Color.RED);
            g2.drawLine(0, 0, bounds.width, bounds.height);
            g2.drawLine(bounds.width, 0, 0, bounds.height);
            g2.dispose();
            JLabel label = new JLabel(new ImageIcon(image));
            label.addMouseListener(new MouseAdapter(){
                public void mousePressed(MouseEvent evt) {
                    System.exit(0);
            JFrame f = new JFrame();
            f.setUndecorated(true);
            f.getContentPane().add(label);
            f.setBounds(bounds);
            f.setVisible(true);
    }

  • Draw lines on an obiee 11.1.1.7.1 map.

    What is the best approach to drawing lines on an obiee 11.1.1.17 map.
    The base map is created In mapbuilder 11.1.1.7.3.
    Our data is stored in our data warehouse. Right now we have 2 million rows in the table. Each row represents an x,y point on the map.
    A typical query in the obiee analysis can return  20- 30 x,y positions on the map. We are only at this time showing points on the map. We would like to present the positions as a line (arrow) showing the direction of flow (ordered by time) from one point to the next point, etc.
    Our question – how can we  draw these lines on the obiee map?
    (For instance, is it better with User Defined FOI layers or is it better using Theme-based FOI layers).
    Best Regards
    Joel

    Hi Again!
    We have managed to get the map with line into our obiee dashboard using the Oracle Maps JS API.
    We are taking the data points in our rapport and sending them with the narrative view to the java script functions as described in the workshop examples. It works nicely.
    We are now wondering if we can draw this line onto a map that is created using the maps view in our obiee rapport. Our goal is show the line together with all the points. We could of course script this in our javascript, however we would like to show the points in our obiee map view together with a line connecting the points.
    As it is now in our "draw the line solution", we define a DIV for the map display
    <DIV id="map" style="width:400px;height:300px;padding:10px;"></DIV>
    And then in our javascript function we use the
    var mapview = new MVMapView(document.getElementById("map"), baseURL);
    We are wondering here if we can point to an obiee map view instead of the DIV “map” 
    We have tried various combinations of static text with javascript together with a map view, but can’t get a line to draw on the map.
    Does anyone have any idea how we can get our line into a map view?
    Best Regards
    Joel

  • How to Count schedule lines in IDoc ORDERS05 using XSLT Mapping

    Hi Experts,
    In a Scenario where we are sending Purchase order (ORDERS05) to SAP SNC using XSLT Mapping,
    where in we need to count the no. of schedule lines against the Purchase Order line.
    As in Schedule line segment there is no such provision, so it needs to be handle in XSLT mapping to count the schedule lines.
    Can you all please guide me how to go about the same.
    Regards,
    Nitin P

    Hi Satish,
    Thank you very much for the reply,
    as there is only Quantity and other information is maintained against schedule lines how we can count the schedule line repeatation against PO line ? Is that very simple as you suggested or some other consideration also needs to be taken.
    Please clarify the same and let me also know if there are some standard documents also for the same.
    Regards,
    Nitin P

  • How to change draw dashed line with arrowhead (not straight)?

    Hi friends,
    The following code sinept draws an arrowed line from a given point to the other point. I want to know how it can changed to be dashed line as well? I would appreciate it if anybody help me for doing such changes.
    Thanks in advance,
    Reza_mp
    import javax.swing.*;
    import java.awt.*;
    import java.util.ArrayList;
    public class ArrowExample extends JFrame
        enum ArrowHead {
            HEIGHT(10), WIDTH(10);
            int n;
            ArrowHead(int n) {this.n = n;}
            public int value() {return n;}
        java.util.List<Arrow> arrows;
        BasicStroke stroke;
        private class Arrow {
            Point start;
            Point end;
            Polygon arrowHead;
            public Arrow(Point start, Point end) {
                this.start = start;
                this.end = end;
                double direction = Math.atan2(end.y - start.y, end.x - start.x);
                System.out.println(direction * 180/Math.PI);
                arrowHead = new Polygon();
                arrowHead.addPoint(0, 0);
                Point p1 = rotate(ArrowHead.WIDTH.value()/2, ArrowHead.HEIGHT.value(), direction);
                arrowHead.addPoint(p1.x, p1.y);
                Point p2 = rotate(-ArrowHead.WIDTH.value()/2, ArrowHead.HEIGHT.value(), direction);
                arrowHead.addPoint(p2.x, p2.y);
                arrowHead.addPoint(0, 0);
                arrowHead.translate(end.x, end.y);
            public Point rotate(int x, int y, double dir) {
                Point p = new Point();
                double r = Math.sqrt(x*x + y*y);
                double theta = Math.atan2(y, x);
                p.setLocation(Math.round(r*Math.cos(theta + dir + Math.PI/2)),
                              Math.round(r*Math.sin(theta + dir + Math.PI/2)));
                return p;
            public void draw(Graphics2D g) {
                g.drawLine(start.x, start.y, end.x, end.y);
                g.drawPolygon(arrowHead);
                g.fillPolygon(arrowHead);
        public ArrowExample() {
            super("Arrows");
            setDefaultCloseOperation(EXIT_ON_CLOSE);
            JPanel p = new JPanel() {
                protected void paintComponent(Graphics g) {
                    super.paintComponent(g);
                    Graphics2D g2d = (Graphics2D)g;
                    Stroke oldStroke = g2d.getStroke();
                    Color oldColor = g2d.getColor();
                    g2d.setStroke(stroke);
                    g2d.setColor(Color.black);
                    for (Arrow a : arrows)
                        a.draw(g2d);
                    g2d.setStroke(oldStroke);
                    g2d.setColor(oldColor);
            p.setBackground(Color.white);
            add(p, BorderLayout.CENTER);
            stroke = new BasicStroke(3);
            arrows = new ArrayList<Arrow>();
            arrows.add(new Arrow(new Point(10,10), new Point(100,100)));
            arrows.add(new Arrow(new Point(300,10), new Point(300,100)));
            arrows.add(new Arrow(new Point(450,450), new Point(400,100)));
            pack();
            setSize(500, 500);
        public static void main(String[] args) {
            setDefaultLookAndFeelDecorated(true);
            SwingUtilities.invokeLater(new Runnable() {
                public void run() {
                    new ArrowExample().setVisible(true);
    }

    Change the draw method as follows:
            public void draw(Graphics2D g) {
                Stroke s = g.getStroke();
                g.setStroke( new BasicStroke( 3.0f, BasicStroke.CAP_BUTT,
                   BasicStroke.JOIN_MITER, 1.0f, new float[] { 10.0f, 10.0f }, 0.0f ) );
                g.drawLine(start.x, start.y, end.x, end.y);
                g.setStroke( s );
                g.drawPolygon(arrowHead);
                g.fillPolygon(arrowHead);
            }

  • How I can map "Sales Target Planning" in SAP?

    Hi All,
    I am working in Sales & Marketing in a Logistic Service Provider Company.
    Our Product is Container (in which RMG & other commodities are transported
    via ship from/to all over the world). Our Sales Target is planned in yearly
    basis on Quantity of Containers, Number of Buyers, Different Corridors,
    Different Commodities etc etc. How we can map our Sales Target Planning in SAP?
    Regards,
    Syed Waseem Reza

    Sir,
    Can you please let us know the high level process flow you have already mapped? I am facing the same problem.... I am here delivering my existing process flow.
    We didnu2019t go for any other special module of SAP
    The General modules of SAP including
    u2022     SD(Sales & Distribution),
    u2022     MM(Material Management),
    u2022     WM(Warehouse Management),
    u2022     LE (Logistic Execution),
    u2022     FI(Finance), CO(Controlling),
    u2022     FA(Fixed Asset)
    Basic Process Mapping:
    u2022     SO(Sales Order) may create directly or against Qut(Quotation)
    u2022     All SO line item will create the PR (Purchase Requisition)
    u2022     Warehouse does the GR (Goods Receive) against PR indirectly SO.
    u2022     Empty and Laden Container enters to Warehouse as a material received.
    u2022     TO (Transfer Order) of Goods to the Bin Location
    u2022     Creates the Outbound Delivery against GR.
    u2022     Picking of Goods from WH Bin to Deliver Place
    u2022     Packing of Goods to the Container as per Shipment.
    u2022     Outgoing Invoice for collection against Outbound Delivery
    u2022     Incoming Invoice for payment against Shipment Cost.
    Management wants to give one sales target such as...
    Year -SO-----Material Group---Material Group
    --(20' Container)-----(40' Container)
    2009-----10,0004,000--
    2,000
    and in the end of the year, Management wants to see the see the following report.
    Year      Targeted      Achieved     Target(20') Achieved(20')  Target(40')  Achieved(40')
    --SOSO-----
    2009-----10,0008,0004,0002,0002,000--
    1,500
    For this I have to store my sales target in any of SAP document, because i have already all the Achieved information in my existing system, because material groups are keeping in the Shipment/Packing phase of the process, So i can easily make the report, but i cant get the Target as I don't have any place to store the same.
    Can anybody help me to proceed?
    Rgds
    Farhad
    Edited by: Farhad Islam on Jan 31, 2009 6:49 AM
    Edited by: Farhad Islam on Jan 31, 2009 6:49 AM

  • Can j2me draw line with double values.

    Hi,
    Can any body know how to darw line in j2me with double values.
    I don't want use draw Line with int.
    Shall i use svg or j2me has solution.
    Thanks and regards,
    Rakesh.

    not possible
    graphics.drawLine(float,float,float,float);...there's no such method in MIDP API: [click here for javadoc of Graphics class methods|http://java.sun.com/javame/reference/apis/jsr118/javax/microedition/lcdui/Graphics.html#drawLine(int,%20int,%20int,%20int)]

  • How to draw line to connect components dynamically??

    Dear Friends:
    I have following code is for drag/drop label, I hope to draw straight line to connect any TWO or more labels within this panel,
    [1]. keep all connected line
    [2]. can draw dynamically,
    I search quite a while with google, still very confused,
    Can any guru throw aome light how to do
    [1]. code 1:
    package swing.dnd;
    import java.awt.*;
    import javax.swing.*;
    public class TestDragComponent extends JFrame {
         public TestDragComponent() {
              super("Test");
              Container c = getContentPane();
              c.setLayout(new GridLayout(1,2));
              c.add(new MoveableComponentsContainer());
              c.add(new MoveableComponentsContainer());
              pack();
              setVisible(true);
         public static void main(String[] args) {
              try {
                   UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
              catch (Exception ex) {
                   System.out.println(ex);
              new TestDragComponent();
    [2]. Code 2:
    package swing.dnd;
    import java.util.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.event.*;
    import javax.swing.border.*;
    import java.awt.dnd.*;
    import java.awt.datatransfer.*;
    import java.awt.image.*;
    import java.awt.dnd.DragSource;
    import java.awt.dnd.DropTarget;
    public class MoveableComponentsContainer extends JPanel {     
         public DragSource dragSource;
         public DropTarget dropTarget;
         private static BufferedImage buffImage = null; //buff image
         private static Point cursorPoint = new Point();
         public MoveableComponentsContainer() {
              setBorder(BorderFactory.createBevelBorder(BevelBorder.LOWERED, Color.white, Color.gray));
              setLayout(null);
              dragSource = new DragSource();
              ComponentDragSourceListener tdsl = new ComponentDragSourceListener();
              dragSource.createDefaultDragGestureRecognizer(this, DnDConstants.ACTION_COPY_OR_MOVE, new ComponentDragGestureListener(tdsl));
              ComponentDropTargetListener tdtl = new ComponentDropTargetListener();
              dropTarget = new DropTarget(this, DnDConstants.ACTION_MOVE, tdtl);
              setPreferredSize(new Dimension(400,400));
              addMoveableComponents();
         private void addMoveableComponents() {
              MoveableLabel lab = new MoveableLabel("label 1");
              add(lab);
              lab.setLocation(10,10);
              lab = new MoveableLabel("label 2");
              add(lab);
              lab.setLocation(40,40);
              lab = new MoveableLabel("label 3");
              add(lab);
              lab.setLocation(70,70);
              lab = new MoveableLabel("label 4");
              add(lab);
              lab.setLocation(100,100);
         final class ComponentDragSourceListener implements DragSourceListener {
              public void dragDropEnd(DragSourceDropEvent dsde) {
              public void dragEnter(DragSourceDragEvent dsde)  {
                   int action = dsde.getDropAction();
                   if (action == DnDConstants.ACTION_MOVE) {
                        dsde.getDragSourceContext().setCursor(DragSource.DefaultMoveDrop);
                   else {
                        dsde.getDragSourceContext().setCursor(DragSource.DefaultMoveNoDrop);
              public void dragOver(DragSourceDragEvent dsde) {
                   int action = dsde.getDropAction();
                   if (action == DnDConstants.ACTION_MOVE) {
                        dsde.getDragSourceContext().setCursor(DragSource.DefaultMoveDrop);
                   else {
                        dsde.getDragSourceContext().setCursor(DragSource.DefaultMoveNoDrop);
              public void dropActionChanged(DragSourceDragEvent dsde)  {
                   int action = dsde.getDropAction();
                   if (action == DnDConstants.ACTION_MOVE) {
                        dsde.getDragSourceContext().setCursor(DragSource.DefaultMoveDrop);
                   else {
                        dsde.getDragSourceContext().setCursor(DragSource.DefaultMoveNoDrop);
              public void dragExit(DragSourceEvent dse) {
                 dse.getDragSourceContext().setCursor(DragSource.DefaultMoveNoDrop);
         final class ComponentDragGestureListener implements DragGestureListener {
              ComponentDragSourceListener tdsl;
              public ComponentDragGestureListener(ComponentDragSourceListener tdsl) {
                   this.tdsl = tdsl;
              public void dragGestureRecognized(DragGestureEvent dge) {
                   Component comp = getComponentAt(dge.getDragOrigin());
                   if (comp != null && comp != MoveableComponentsContainer.this) {
                        cursorPoint.setLocation(SwingUtilities.convertPoint(MoveableComponentsContainer.this, dge.getDragOrigin(), comp));
                        buffImage = new BufferedImage(comp.getWidth(), comp.getHeight(), java.awt.image.BufferedImage.TYPE_INT_ARGB_PRE);//buffered image reference passing the label's ht and width
                        Graphics2D graphics = buffImage.createGraphics();//creating the graphics for buffered image
                        graphics.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 0.5f));     //Sets the Composite for the Graphics2D context
                        boolean opacity = ((JComponent)comp).isOpaque();
                        if (opacity) {
                             ((JComponent)comp).setOpaque(false);                         
                        comp.paint(graphics); //painting the graphics to label
                        if (opacity) {
                             ((JComponent)comp).setOpaque(true);                         
                        graphics.dispose();
                        remove(comp);
                        dragSource.startDrag(dge, DragSource.DefaultMoveDrop , buffImage, cursorPoint, new TransferableComponent(comp), tdsl);     
                        revalidate();
                        repaint();
         final class ComponentDropTargetListener implements DropTargetListener {
              private Rectangle rect2D = new Rectangle();
              Insets insets;
              public void dragEnter(DropTargetDragEvent dtde) {
                   Point pt = dtde.getLocation();
                   paintImmediately(rect2D.getBounds());
                   rect2D.setRect((int) (pt.getX()-cursorPoint.getX()),(int) (pt.getY()-cursorPoint.getY()),buffImage.getWidth(),buffImage.getHeight());
                   ((Graphics2D) getGraphics()).drawImage(buffImage,(int) (pt.getX()-cursorPoint.getX()),(int) (pt.getY()-cursorPoint.getY()),MoveableComponentsContainer.this);
                   dtde.acceptDrag(dtde.getDropAction());
              public void dragExit(DropTargetEvent dte) {
                   paintImmediately(rect2D.getBounds());
              public void dragOver(DropTargetDragEvent dtde) {
                   Point pt = dtde.getLocation();
                   paintImmediately(rect2D.getBounds());
                   rect2D.setRect((int) (pt.getX()-cursorPoint.getX()),(int) (pt.getY()-cursorPoint.getY()),buffImage.getWidth(),buffImage.getHeight());
                   ((Graphics2D) getGraphics()).drawImage(buffImage,(int) (pt.getX()-cursorPoint.getX()),(int) (pt.getY()-cursorPoint.getY()),MoveableComponentsContainer.this);
                   dtde.acceptDrag(dtde.getDropAction());
              public void dropActionChanged(DropTargetDragEvent dtde) {
                   Point pt = dtde.getLocation();
                   paintImmediately(rect2D.getBounds());
                   rect2D.setRect((int) (pt.getX()-cursorPoint.getX()),(int) (pt.getY()-cursorPoint.getY()),buffImage.getWidth(),buffImage.getHeight());
                   ((Graphics2D) getGraphics()).drawImage(buffImage,(int) (pt.getX()-cursorPoint.getX()),(int) (pt.getY()-cursorPoint.getY()),MoveableComponentsContainer.this);
                   dtde.acceptDrag(dtde.getDropAction());
              public void drop(DropTargetDropEvent dtde) {
                   try {
                        paintImmediately(rect2D.getBounds());
                        int action = dtde.getDropAction();
                        Transferable transferable = dtde.getTransferable();
                        if (transferable.isDataFlavorSupported(TransferableComponent.COMPONENT_FLAVOR)) {
                             Component comp = (Component) transferable.getTransferData(TransferableComponent.COMPONENT_FLAVOR);
                             Point location = dtde.getLocation();
                             if (comp == null) {
                                  dtde.rejectDrop();
                                  dtde.dropComplete(false);
                                  revalidate();
                                  repaint();
                                  return;                              
                             else {                         
                                  add(comp, 0);
                                  comp.setLocation((int)(location.getX()-cursorPoint.getX()),(int)(location.getY()-cursorPoint.getY()));
                                  dtde.dropComplete(true);
                                  revalidate();
                                  repaint();
                                  return;
                        else {
                             dtde.rejectDrop();
                             dtde.dropComplete(false);
                             return;               
                   catch (Exception e) {     
                        System.out.println(e);
                        dtde.rejectDrop();
                        dtde.dropComplete(false);
    Thanks so much for any help.
    Reagrds
    sunny

    Craig Wood's code here might do what you want
    http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&f=2&t=015259

  • How to draw lines in FCPX ?

    Hi there,
    I would like to have a simple Effects that will draw lines in various shape such as circle, ellipse or rectangle. How do I do it ?
    I need it because I want to have an effect that is drawing an ellipse over the text.
    Any ideas ?
    Thanks

    ok... hmmm...
    You can create control points for a line but you cannot animate the control points in FCPX. If you're okay with that, then here are the basics:
    Create a new top level group. Name it OSCs.
    In the Inspector, select the group and in the Group tab of the inspector, select Fixed Resolution. (It should already be set to 2D - if not - set 2D)
    In the Properties > Timing pane, set the length (Duration) of the group to at least as long as your project. (this step is not important in Motion but absolutely necessary for FCPX!)
    With the new group selected, add the filters you will use as control points. In general, every starts with Filters > Distortion > Poke. You will need two of them. For each Poke filter, select Publish OSC in the inspector. (I recommend renaming each filter - startOSC, endOSC for example.)
    Create another new group.
    Go into the Library > Content and search for Crosshair -- there's three of them, use Crosshair-Minute (they're the smallest ones.) Add two of them. (It's not necessary that they're in their own group -- just more convenient.) Rename the crosshairs: keeping with the OSCs, I recommend start and end, for example.
    Draw a Line.
    To the shape (line), add two Behaviors > Shape > Track Points.
    Rename the Track Points: Start and End.
    In the Behaviors inspector for the Track Points, drag the start Crosshair image into the Source well of the Start track points and the end Crosshair image into the End Track Points. The behavior parameters will change and you'll see a bunch of new stuff. Down at the bottom, you'll see Track 1 and Track 2 — leave one checked for one of the behaviors and the other one checked for the second behavior (that's 1 track 1 and 1 track 2.) You'll also see that the Transform is set to Mimic Source.  What you need to do is click the reset button on the Checked Track of each behavior and THEN change the Transform to Attach to Source. Once you do that, the line ends will snap to crosshair images (use Properties Transform X to move the crosshairs apart temporarily.)
    Next step:
    Select the start crosshair and in the Inspector > Properties, dial down the Position to reveal the XYZ parameters. Right click on the X and select Add Parameter Behavior > Link.  Repeat this step for the Y parameter (you cannot link Position.All for this step.)
    In the Behaviors inspector, for the start crosshair:
          For the Source Object, drag the OSCs group into the well.
    for the X parameter
          For the Source Parameter, set Filters.startOSC.Center.X for the Position.X
                                                 and set Filters.startOSC.Center.Y for the Position.Y
    You will notice the line end disappear off the screen. This is normal. To correct this, at the bottom of each behavior, set the X (or Y) offset to -0.5.
    Repeat for the end crosshair.
    You can turn off the crosshairs (uncheck the layers.)
    To test your OSCs, select *both* startOSC and endOSC (command select each layer) -- both Poke OSCs will appear and you can drag them around the canvas. The line should follow as you would expect if you've set everything up correctly.
    Publish the template.
    A couple of explanations:
    2D fixed resolution for the OSC group:  Groups in Motion that are not fixed resolution can dynamically change their boundaries. There are no fixed points of reference for Motion to calulate. If you forget to set Fixed Resolution, you can repair the condition by setting the Fixed Resolution option and then go into the Filters pane and reset the Center parameters for each Poke OSC.
    Offsets of -0.5:  All resolutions in the Canvas are calculated by the resolution of the X and Y dimensions of the project times the fractional position of objects (from 0.0 on the left side for X and on the bottom for Y — to 1.0 on the right side for X and on the top for Y.) The center of the canvas is 0, 0 in pixels of whatever the resolution is.  To adjust the fractional position used by the OSCs (and others) to the center pixel, the value needs to be moved by 1/2 of that distance.
    Clear as mud?  Once you've done it a few times, it will all become second nature.
    One more thing: you can publish curves... complex ones. But they have to be B-spline (you track all the points in a similar manner outlined above) and not Bezier. There's no way to control the handles for bezier curves.

  • How to draw line with width at my will

    Dear frineds:
    I have following code to draw lines, but I was required:
    [1]. draw this line with some required width such as 0.2 or 0.9 or any width at my will
    [2]. each line after I draw, when I use mouse to click on it, it will be selected and then I can delete it,
    Please advice how to do it or any good example??
    Thanks
    sunny
    package com.draw;
    import java.util.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.event.*;
    public class DrawingArea extends JPanel
         Vector angledLines;
         Point startPoint = null;
         Point endPoint = null;
         Graphics g;
         public DrawingArea()
              angledLines = new Vector();
              setPreferredSize(new Dimension(500,500));
              MyMouseListener ml = new MyMouseListener();
              addMouseListener(ml);
              addMouseMotionListener(ml);
              setBackground(Color.white);
         public void paintComponent(Graphics g)
              // automatically called when repaint
              super.paintComponent(g);
              g.setColor(Color.black);
              g.setFont(getFont());
              AngledLine line;
              if (startPoint != null && endPoint != null)
                   // draw the current dragged line
                   g.drawLine(startPoint.x, startPoint.y, endPoint.x,endPoint.y);
              for (Enumeration e = angledLines.elements(); e.hasMoreElements();)
                   // draw all the angled lines
                   line = (AngledLine)e.nextElement();
                   g.drawPolyline(line.xPoints, line.yPoints, line.n);
         class MyMouseListener extends MouseInputAdapter
              public void mousePressed(MouseEvent e)
                   if (SwingUtilities.isLeftMouseButton(e))
                        startPoint = e.getPoint();
              public void mouseReleased(MouseEvent e)
                   if (SwingUtilities.isLeftMouseButton(e))
                        if (startPoint != null)
                             AngledLine line = new AngledLine(startPoint, e.getPoint(), true);
                             angledLines.add(line);
                             startPoint = null;
                             repaint();
              public void mouseDragged(MouseEvent e)
                   if (SwingUtilities.isLeftMouseButton(e))
                        if (startPoint != null)
                             endPoint = e.getPoint();
                             repaint();
              public void mouseClicked( MouseEvent e )
                   if (g == null)
                        g = getGraphics();
                   g.drawRect(10,10,20,20);
         class AngledLine
              // inner class for angled lines
              public int[] xPoints, yPoints;
              public int n = 2;
              public AngledLine(Point startPoint, Point endPoint, boolean left)
                   xPoints = new int[n];
                   yPoints = new int[n];
                   xPoints[0] = startPoint.x;
                   xPoints[1] = endPoint.x;
                   yPoints[0] = startPoint.y;
                   yPoints[1] = endPoint.y;
                   /*if (left)
                        xPoints[1] = startPoint.x;
                        yPoints[1] = endPoint.y;
                   else
                        xPoints[1] = endPoint.x;
                        yPoints[1] = startPoint.y;
         public static void main(String[] args)
              JFrame frame = new JFrame("Test angled lines");
              frame.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
              DrawingArea d = new DrawingArea();
              frame.getContentPane().add( d );
              frame.pack();
              frame.setVisible(true);
    }Message was edited by:
    sunnymanman

    sonudevgan wrote:
    dear piz tell me how i can read integer from user my email id is [email protected]
    foolish, foolish question

  • Hello apple guys, i can't open app store, reminders, contacts, mail(crash), maps, Image Capture, and other apps that comes with Mavericks OS, how i can solve this problem?

    hello apple guys, after installing OS X Mavericks, i can't open app store, reminders, contacts, mail(crash), maps, Image Capture, and other apps that comes with Mavericks OS, how i can solve this problem?

    So is this the way Apple works now? Not solving customers problems? I'm sure so many users have had this problem. I've had, and I reinstalled Mavericks 3 times. Works fine for some days and then several Apple Apps stop working. Is that a way to force us ti update to Yosemite? (I don't want to) and then pay to update some third party programs (i.e. Pro Tools). Also, there are so many 15" MacBooks Pro with graphic problems and of course the guys at the Apple Service Centers always say: "It's the logic board, you can have it replaced, but it's so expensive I would recommend a new Mac".  I really, really miss Steve Jobs!

Maybe you are looking for