• RELEVANCY SCORE 3.30

    DB:3.30:Flicker Free Repaint? mj




    hi
    dose any1 knows how to make it flicker free?
    i have some drawed forms (polygon). and i can drag this forms. but to make the drag prozess visible i have to call repaint() during mouse is moved. and it produces bad flicker :(

    thnx boblgum

    DB:3.30:Flicker Free Repaint? mj

    Paint a rectangle with the backgroundcolor.

    public void paint(Graphics g){
    g.setColor(Color.white);
    g.fillRect(bounding.x, bounding.y, bounding.width, bounding.height);
    }The reference bounding is an instance from class Rectangle.
    Choose the boundingbox to be as small as possible.

  • RELEVANCY SCORE 3.25

    DB:3.25:5329 + Tft : Flicker Problem da




    Hello

  • RELEVANCY SCORE 3.21

    DB:3.21:Polygon Help s1




    Hey new to java and have designed an application to draw a polygon and another to test it

    setPreferredSize(new Dimension(50,50));
    setBorder(null);
    button1Colour=Color.red;
    setPolygon(new Polygon());
    getPolygon().addPoint(0,0);
    getPolygon().addPoint(50,0);
    getPolygon().addPoint(25,50);the problem is with the code above the program displays a downward pointing polygon and if I reverse the values in the last 2 getPolygon methods I can display a right facing polygon however I have been unable to amend the above code to present a left facing and up facing polygon, would appreciate any help Cheers!

    DB:3.21:Polygon Help s1

    just did a search for it and it looks like what am looking for thanks a lot for the help. Cheers

  • RELEVANCY SCORE 3.13

    DB:3.13:Re: Polygon Vertex Problem dc


    I'm having problem, I'm modeling a robot and when I'm moving a vertex in the polygon I'm moving other polygons too, not every were just at places with close vertexes... Is there any way to make this go away?

  • RELEVANCY SCORE 3.10

    DB:3.10:Polygon Selection Problem dx


    Hi all:I have a problem when I select polygons using any mode(retangle,lasso,raycast...).Not only those faces I do selected are highlighted,but also some random faces are highlighted/selected,too.:confused: Does anyone experience that thing?I have tried XSI 7 trail,the problem still happen with antialiasing.I use quadro fx4600 and 176.04_quadro_winxp64 driver.

    DB:3.10:Polygon Selection Problem dx

    I have tried XSI 7 trail,the problem still happen with antialiasing.I use quadro fx4600 and 176.04_quadro_winxp64 driver.

  • RELEVANCY SCORE 3.10

    DB:3.10:Ve6 Circular Polygon Inaccuracy pf


    I'm new to VE and seem to have a problem re accuracy of polygons
     
    I'm creating a circular polygon from an array of VELatLong objects to denote an area within a radius of a location
     

    Code Block

    DB:3.10:Ve6 Circular Polygon Inaccuracy pf

    Sure,
    john at soulsolutions.com.au
     
    I don't seem to have an issue with this so it would be good to spot the problem.
    Sample of drawing circles in action at:
    http://www.viawindowslive.com/Resources/VirtualEarth/VirtualEarthQuickGuide.aspx
    (draw circle)
     
    John.
     

  • RELEVANCY SCORE 3.07

    DB:3.07:Re: Point On Polygon pd



    Hello guys!

    I am a new user of autocad civil 3d 2012, and i just learn from youtube and some friends. i have this problem in putting descriptions of each polygon. In topographic survey we usually detail each corners of the square of rectangle manholes, this comes in different types, there are Telephone manhole, Foul Sewer manhole, Water manhole and many more, my question is, how can I put annotation inside my figure polygon automaticaly?

    Thanks,

    Nazarene







    Solved!
    Go to Solution.

    DB:3.07:Re: Point On Polygon pd

    I'll give you kudo for understanding that post once through



    Thank youJoseph D. Bouza, P.E. (one of 'THOSE' People) Civil 3D 2012 2013HP Z210 WorkstationIntel Xeon CPU E31240 @ 3.30 Hz12 GB RamNote: Its all Resistentialism, so keep calm and carry on64 Bit Win7 OS

  • RELEVANCY SCORE 3.07

    DB:3.07:Mdi Opengl Flicker 2 3s


    I have the same problem like this:
    http://social.msdn.microsoft.com/forums/vstudio/en-US/647f82c7-9db0-4e22-b9f5-59c356eda0cf/mdi-opengl-flicker
    How have you solved it?

    DB:3.07:Mdi Opengl Flicker 2 3s

    Hi, May,
    My environment: Windows 8, VS 2012.
    For TabbedMDI creation I use MFC and OpenGL for rendering.
    Window resizing works correctly, but when I switch between windows a flicker happens.
    All works fine if I use DirectX for rendering.
    How is it possible to prevent flickering effect in case of OpenGL?

  • RELEVANCY SCORE 3.05

    DB:3.05:Polygon Skewed During Rotation 93


    I'm trying to rotate a polygon using AffineTransforms createTransformedShape routine which returns a GeneralPath Shape.

    I then copy the points from each segment in the GeneralPath back to my polygon. After multiple redraws of the polygon in paintcomponent the polygon becomes skewed. Apparently I'm losing accurate point information during the copy and cast to (int).

    I've attached a short version of my code including the problem , and I'd REALLY prefer to keep my data points stored in a Polygon instead of changing the whole program to work with GeneralPath Shape instead.

    Is there a way I can fix this skewing problem? Please help,
    thanks.

    (press spacebar to ciew the skewed result when running the program)

    import java.awt.*;
    import java.awt.geom.*;
    import java.awt.event.KeyEvent;
    import java.awt.event.KeyListener;
    import javax.swing.*;

    public class PolygonRotation extends JPanel implements KeyListener{

    private static final long serialVersionUID = 1L;
    Polygon Polygon;
    Shape Poly;
    AffineTransform AT = new AffineTransform();
    PathIterator GPIterator;
    int SegmentType = 0;
    double[] PointsOnSegment = new double[6];

    protected void paintComponent(Graphics g){
    System.out.println("in paint component");
    super.paintComponent(g);
    Graphics2D g2 = (Graphics2D)g;
    g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
    RenderingHints.VALUE_ANTIALIAS_ON);

    g.setColor(Color.red);
    ((Graphics2D)g).fill(Polygon);
    }

    public void keyTyped(KeyEvent arg0) {
    // TODO Auto-generated method stub
    }

    public void keyReleased(KeyEvent arg0) {
    // TODO Auto-generated method stub
    }

    public void keyPressed(KeyEvent e) {
    System.out.println(e.getKeyCode());

    switch (e.getKeyCode()) {
    case 32: //spacebar
    rotate();
    break;
    default:
    break;
    }
    this.repaint();
    }

    public void rotate() {
    Point2D.Double p = getRotationPoint(Polygon);
    AT.setToIdentity();
    AT.translate(p.x, p.y);
    AT.rotate(Math.toRadians(45));
    AT.translate(-p.x, -p.y);
    //I must capture the rotated polygon as a Shape
    //(AT.createTransformedShape returns a GeneralPath)
    Poly = AT.createTransformedShape(Polygon);
    copyPath(Poly, Polygon);
    }

    private Point2D.Double getRotationPoint(Polygon poly){
    int x = poly.xpoints[1];
    int y = poly.ypoints[1];
    return new Point2D.Double(x, y);
    }

    private void copyPath(Shape path, Polygon poly){
    GPIterator = path.getPathIterator(AT);
    poly.reset();
    int tempx;
    int tempy;
    while (GPIterator.isDone() == false) {
    SegmentType = GPIterator.currentSegment(PointsOnSegment);
    tempx = (int)PointsOnSegment[0];
    tempy = (int)PointsOnSegment[1];
    if(SegmentType != 4){
    poly.addPoint(tempx, tempy);
    }
    GPIterator.next();
    }
    }

    private void initPolygon(){
    Polygon = new Polygon();
    Polygon.addPoint(300, 300);
    Polygon.addPoint(300, 400);
    Polygon.addPoint(350, 400);
    Polygon.addPoint(350, 300);
    }

    public static void main(String[] args){
    PolygonRotation pr = new PolygonRotation();
    pr.initPolygon();
    JFrame f = new JFrame();
    f.addKeyListener(pr);
    f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    f.getContentPane().add(pr);
    f.setSize(600,600);
    f.setLocation(200,200);
    f.setVisible(true);
    }
    }

    DB:3.05:Polygon Skewed During Rotation 93

    Thanks for your reply. I've tried this, but I think there is a bug in the code returning the "Shape" from the createTransformedShape() method call.

    For example. If I call translate(0, 20) it will be drawn with the correct translation, but printing the "Shape" object points will reveal a shift of translate(0, 40)! I don't believe my code could have created this issue.
    Shape tempShape = AT.createTransformedShape(Polygon);

    PathIterator GPIterator = tempShape.getPathIterator(AT);
    while (GPIterator.isDone() == false) {
    SegmentType = GPIterator.currentSegment(PointsOnSegment);
    System.out.println("point: " + PointsOnSegment[0] + ", " + PointsOnSegment[1]);
    GPIterator.next();
    }The problem is that I can't do accurate collision checking when the "Shape" points retrieved are not the same as those of the rendered Polygon!

    Am I crazy or is there a bug in the source?
    I'm using jdk1.5.0_06
    What do you think? thanks,

  • RELEVANCY SCORE 3.01

    DB:3.01:The Screen Flicker Problem When Playing A Video c3



    (Version : 32. android)

    DB:3.01:The Screen Flicker Problem When Playing A Video c3

    Question owner


    Reinstall firefox for android ? I haven't tried this before, but I will give it a try.

  • RELEVANCY SCORE 2.99

    DB:2.99:How To Draw Doughnut Polygons? s3


    Hi all,i have a number of polygons that i have to draw on the screen. Each polygon is represented by a number of points (x, y). If the points run clockwise, the inside of the polygon is to be filled. If the points run counter-clockwise, the inside of the polygon is to be excluded.What this means is, if i have a counter-clockwise polygon within a clockwise polygon, i should end up with a doughnut-like polygon on screen.How can i achieve this in .NET (C#)?Firstly, i'm having problems detecting whether the points run clockwise or counter-clockwise.Secondly, the relevant API (Graphics.FillPolygon) takes one polygon at a time. This means that i couldn't say fill this first polygon but exclude the second one. (Filling the clockwise polygon and then filling the excluded counter-clockwise polygon with the original background is not a viable option either.)One of the Graphics.FillPolygon overloads takes as an argument the FillMode, which does SEEM to be able to solve my first problem of whether the points run clockwise or counter (i.e. i should choose FillMode.Winding), however the problem remains that the method only draws one polygon at a time.TIA and Regards,Edwin

    DB:2.99:How To Draw Doughnut Polygons? s3

    Why not create a single polygon from the 2 separate polygons and then call FillPolygon?

  • RELEVANCY SCORE 2.98

    DB:2.98:Polygon Collider 2d. Can Not Select Vertices With Shift Key z3



    I think I found a work around. It seems my problem is that my game object is purposely rotated. Instead of putting the polygon collider on the main gameobject I created a unparented empty and shaped the polygon collider on that. Then I parented it to my gameobject and dealt with the collision through a script.

    DB:2.98:Polygon Collider 2d. Can Not Select Vertices With Shift Key z3


    I think I found a work around. It seems my problem is that my game object is purposely rotated. Instead of putting the polygon collider on the main gameobject I created a unparented empty and shaped the polygon collider on that. Then I parented it to my gameobject and dealt with the collision through a script.

  • RELEVANCY SCORE 2.97

    DB:2.97:Threads Waaaaaa!!! x8


    ok i've got my program working, at least a basic rough draft.
    Its really to big and messy to post.
    Now thats not my problem, the problem is in my run method.
    When i draw a polygon, thier is no flicker but when i draw 2 of them, flicker starts.
    I am useing a thread. but i cant seem to figure out why.

    Ive overidden update and syncronized paint and run.
    Im still not geting the desired result though.

    any helps apreciated heres the basic code.
    its to big to post in its entirety im also useing a keylistener public void start(){ //----------------start
    System.out.println("in start !");
    if(runner==null){
    runner=new Thread(this);
    runner.setPriority(Thread.MAX_PRIORITY);
    runner.start();

    if ((curD.width !=getSize().width) || (curD.height !=getSize().height)){
    curD =getSize();
    osImg = createImage (curD.width,curD.height);
    osG = osImg.getGraphics();
    }// endofif
    } //endof if thread runing
    }
    public void stop(){ //----------------------stop
    System.out.println("in stop !");

    if(runner!=null){
    System.out.println(" stoping the thread !");
    runner=null; // stop the thread
    }//eoif
    }

    public void update (Graphics g) { //---------------------------------update
    //System.out.println("in update !");
    paint(g);
    }
    synchronized public void paint(Graphics g){ //-----------------paint
    if(osImg != null)
    g.drawImage(osImg,0,0,this );
    notifyAll();
    }

    synchronized public void run(){ //------------------------------------------*run*
    System.out.println("in run !");
    while(true){
    /*....other code...*/
    osG.setColor(Color.white);
    /* code for what will be drawn */
    osG.fillPolygon(Xtemp,Ytemp,3);

    if(Entertoggle == 1){ //optional
    if(Selectedpoly == poly_Count){
    /* code for what will be drawn2*/
    } //if Selectedpoly
    osG.drawPolygon(Xtemp,Ytemp,3);
    } // eo optional

    DB:2.97:Threads Waaaaaa!!! x8


    Just a note. Regarding your code...
    public void stop(){ //----------------------stop
    System.out.println("in stop !");
    if(runner!=null){
    System.out.println(" stoping the thread !");
    runner=null; // stop the thread
    }//eoif
    }Setting the reference to the thread to null will not stop the thread. When you called start() on the Thread, you added it to the default ThreadGroup, which will maintain a reference to it... your Thread will continue running until the JVM cuts it off at the ankles. So to speak.

    Consider changing it to something like the following...

    private boolean running = false;
    public void start() {
    new Thread(this).start(); // You no longer need a reference to the Thread
    // Other start code
    }
    public void stop() {
    running = false;
    }

    // ...

    synchronized public void run() {
    System.out.println("In run()");
    while (running) {
    // Code as normal
    } // end while
    System.out.println("Run ending");
    }This isn't an optimal solution however... if stop is called, then start is called before the current running thread checks the while condition (running), then you will have two Threads executing synchronously. Or more, if it happens more than once!

    To improve the overall design, you might want to consider the oft-touted (and rightfully so) separation of logic from presentation. In this case, it would be the separation of the threaded code (essentially just the run method, plus the required data structures) into a new class (called Runner here), which could be created and started from your start method as above. One obvious immediate improvement is that each Runner would store its own running state, so each can be started and stopped independently, as required.

    Sorry to be so long-winded, but it should prove beneficial in the long run. Enjoy your Java,

    -Troy

  • RELEVANCY SCORE 2.97

    DB:2.97:Problem With Polygon Shape 1c


    Hi All, In my Canvas contains a Polygon, it i set the Stretch to Fill, it cant go outside the allocated space means we cant move the Polygon points to outside the allocated space, otherwise if i set the Stretch to None, and change the height and width the polygon then the Polygon cut the shape,  but the main thing is it works fine in Expression Blend, is the problem in my code? or? check these threads to get more information about this problem? 1. Set the height and width of polygon 2. Change Polygon points outside the allocated space please give a reply Thanks in advanceVineeth

  • RELEVANCY SCORE 2.97

    DB:2.97:Satellite L635 S3050rd Screen Flicker za



    Got a new laptop, on 1st use it presented occasional black screen flicker. Sent it for repairs, 3 months later it gets back but still has the same problem. The flicker is very occasional when on battery power but much more frequent on AC, and unbearable when the colour #26344a predominates on screen (those used to web design and css will know what that number means, in RGB: 38 52 74)

    The problem seems unrelated to screen brightness. I've put up a video to better illustrate the issue:

    YouTube video




    Satellite L635-S3050RD - psk00u 05902x

    DB:2.97:Satellite L635 S3050rd Screen Flicker za


    Satellite L635-S3050RD Specifications

    Satellite L635-S3050RD Downloads

    Miguel

    I can't really help with any problems with games. Your notebook especially does not have the type of video card that would support many games. So, video performance in games will be marginal at best.

    But, you could try reloading your core set of drivers chipset, display and sound. Download and double click to install these drivers in this order:

    Intel Chipset SW Installation Utility

    Intel Turbo Boost Technology Driver

    Intel Display Driver (same as you have now)

    Conexant Audio Driver

    However, if you're happy with it now, remember that 'if it ain't broke don't fix it'.

    Mike

  • RELEVANCY SCORE 2.97

    DB:2.97:Polygon Collider 2d Collision Problem 8j



    Have you tried increasing the Iteration solver count in Edit Project Settings Physics/Physics 2D ?

    DB:2.97:Polygon Collider 2d Collision Problem 8j


    Have you tried increasing the Iteration solver count in Edit Project Settings Physics/Physics 2D ?

  • RELEVANCY SCORE 2.96

    DB:2.96:Xmlencoding Of A Custom Class m7


    I'm trying to save game levels as XML code using the XMLEncoder. I've made getters and setters for every attribute and a no-arg constructor, but still some attributes are missing in the XML code. I've spent a LOT of time reading about different XML APIs, without learning anything to help me.

    I've made a TestClass to illustrate the problem:
    public class TestClass {
    private Polygon polygon;
    private Rectangle rectangle;
    public TestClass() {
    polygon = new Polygon();
    rectangle = new Rectangle();
    }
    public Polygon getPolygon() {
    return polygon;
    }
    public void setPolygon(Polygon polygon) {
    this.polygon = polygon;
    }
    public Rectangle getRectangle() {
    return rectangle;
    }
    public void setRectangle(Rectangle rectangle) {
    this.rectangle = rectangle;
    }
    }The code to encode a TestClass object:
    public class XMLProcessor {
    public static void main(String[] args) {
    TestClass tc = new TestClass();
    Polygon p = new Polygon();
    p.addPoint(5, 6);
    p.addPoint(7, 8);
    tc.setPolygon(p);
    Rectangle r = new Rectangle();
    r.setBounds(1, 1, 10, 10);
    tc.setRectangle(r);
    try {
    XMLEncoder e = new XMLEncoder(new FileOutputStream("Test.xml"));
    e.writeObject(tc);
    e.close();
    } catch(Exception e) {
    System.out.println(e);
    }
    }
    }This produces the following XML document:
    ?xml version="1.0" encoding="UTF-8"?
    java version="1.5.0_06" class="java.beans.XMLDecoder"
    object class="xmltest.TestClass"
    void property="rectangle"
    object class="java.awt.Rectangle"
    int1/int
    int1/int
    int10/int
    int10/int
    /object
    /void
    /object
    /javaAs you can see, the polygon is missing, although it has a set- and get-method. The encoding also works for java.awt.Point, but not for java.awt.Point2D.

    What can I do to fix this?

  • RELEVANCY SCORE 2.93

    DB:2.93:Simple Question About Polygon s8


    Hi

    i would like my small program to tell me if the place I click with my mouse is inside a polygon... My problem is NOT the MouseListener or the If sentence... My problem is when I sysouts the polygon.getBounds() I get: java.awt.Rectangle[x=0,y=0,width=0,height=0]

    How come??

    I make my polygon with four points....
    I don't get it... Please help me...

    DB:2.93:Simple Question About Polygon s8

    Method getBounds works for me:
    import java.awt.geom.*;

    public class Test {
    public static void main(String[] args) {
    GeneralPath polygon = new GeneralPath();
    polygon.moveTo(100, 100);
    polygon.lineTo(200, 200);
    polygon.lineTo(300, 100);
    polygon.lineTo(200, 0);
    polygon.closePath();
    System.out.println(polygon.getBounds());
    }
    }

  • RELEVANCY SCORE 2.92

    DB:2.92:I Cannot Change The Number Of Sides Of A Polygon In Illustrator 5.1 (Windows) p9



    Hello,

    For some reason I do not understand I cannot change the number of sides of a polygon by dubble clicking on the tool. For other tools (where you can change something) this is no problem and workes, but not for the polygon tool. Anyone a clue?

    Thanks!

  • RELEVANCY SCORE 2.92

    DB:2.92:Shape Layers (Mappolygons) - Display Issues When Zoomed In Close f9


    When I create MapPolygons (simple or complex) I'm seeing issues when zooming in far.The polygon will flicker and sometimes the fill color will be on the wrong side ofthe polygonboundary line.
    So I looked at the official bing Maps Silverlight Control Interactive SDK
    http://www.microsoft.com/maps/isdk/silverlight/
    and it happens there too:
    1. Go to Use shape layers
    2. Add a shape layer
    3. Zoom in all the way on the vertical boundary line right in between
    Kirkland and Redmond while keeping the boundary line somewhere in the middle of the map. I just picked a spot but this happens at different locations of the polygon.
    Has anybody noticed this or know if there is a fix for it?
    Thanks!

    DB:2.92:Shape Layers (Mappolygons) - Display Issues When Zoomed In Close f9

    This is a known issue. I reported this a couple months back to Microsoft. Hopefully it gets fixed int he next release. There is no fix available for this yet.Windows Live Developer MVP - http://rbrundritt.spaces.live.com

  • RELEVANCY SCORE 2.92

    DB:2.92:Polygon Processing fk


    Hi All

    I have a parcel of land stored as a polygon in oracle. I need to extract the street facing boundary and return it as a separate geometry of type line. I have been stuck for days now on this problem and would greatly appreciate any assistance.

    Regards

    Jacques

    DB:2.92:Polygon Processing fk

    Hi Reggie

    I have two layers ie.
    sp_parcel ; all the parcels in the city
    sp_rdcl ; all the road centre lines

    Currently i can pick up all the parcels adjacent to a road centre line by putting a buffer arround the road centre line. If i can break up a parcel polygon boundaries and convert them to a line geometry i can test if the boundary falls within this buffer. Hopefully this will be a once off but i cannot guarantee it.

    Thank you for your assistance, it is greatly appreciated.

    Jacques Schalkwyk
    jacquess@ekurhuleni.com

  • RELEVANCY SCORE 2.92

    DB:2.92:Puzzle Game - Getting Keyboard Focus Onto A Polygon p9


    Hello,
    I’m building a simple jigsaw puzzle game with various Polygon puzzle pieces lying around on a Canvas. I would like the user to be able to mouse drag a puzzle piece around, and rotate it with left/right arrow keys. I’m at the point where I can drag and
    rotate the Polygon puzzle pieces in response to user mouse events*, but have not succeeded at rotating the puzzle pieces using the left/right arrow keys. My problem is getting keyboard focus to the “mouse selected” Polygon puzzle piece. Just can’t seem to
    get the KeyDown event to kick in for the Polygon puzzle piece so it can be processed…
    Polygon.CaptureMouse works like a champ but there does not appear to be an equivalent Polygon.CaptureKeyboard method.
    Grasping at straws I’ve tried:

    Set isKeyBoardFocused = true, not effective (no surprise), Polygon.Focusable is listed as a polygon property but seems to be out of context,
    Keyboard.Focus(Polygon) is out of context.
    Info under the UIElement.Focusable property might lead one to believe keyboard focus is simply not available for some UIElements such as a Polygon… Is this true? Is there any way to get keyboard focus onto a Polygon? Could it be hard wired to when the
    Polygon has mouse focus (“selected” by the mouse)? Other work-around?
    Any ideas, examples, or articles would be appreciated.
    *I’m modifying Polygon.Points, not using Transforms.

    DB:2.92:Puzzle Game - Getting Keyboard Focus Onto A Polygon p9

    Thanks MisterGoodcat for the fast response and the alternative strategy, will give it a try.
    It also occurs to me I might be able to rotate the puzzle piece with a mousewheel event, which could be pretty smooth...

  • RELEVANCY SCORE 2.90

    DB:2.90:Polygon Problem x9


    Hi Everyboody,

    I create a Polygon, and add a rectangular triangle point to the polygon.
    If I call the contains sometimes not get true value, but the coordinate points are exactly in the wrapped lines of triangle.

    Why?

    Laszlo

    Message was edited by:
    LKovari

    DB:2.90:Polygon Problem x9

    Hi Everyboody,

    I create a Polygon, and add a rectangular triangle
    point to the polygon.
    If I call the contains sometimes not get true value,
    but the coordinate points are exactly in the wrapped
    lines of triangle.

    Why?

    Laszloyour problem description does not make any sense.
    would you please explain more? or post code etc.
    Message was edited by:
    LKovari

  • RELEVANCY SCORE 2.90

    DB:2.90:Tessallation Problem (Nurbs Converted To Polys) f1


    Hi!how do i use tessallation if i converted a nurbs into a polygon?

    DB:2.90:Tessallation Problem (Nurbs Converted To Polys) f1

    After you coverted to polygons how did you hide the original NURBS layer?

  • RELEVANCY SCORE 2.89

    DB:2.89:Polygon Collision With Other Polygon jj


    Hi all,

    I have some problem with checking polygon collision.
    I have many polygon (around 60 polygons) with so many point (each has more than 50 points). what I want is checking that polygon is next to (collision) with the second polygon or not.
    to simplify the case I use the 2 rectangle polygons like below.
    Polygon a = new Polygon();
    a.addPoint(20, 20);
    a.addPoint(30, 20);
    a.addPoint(30, 30);
    a.addPoint(20, 30);

    Polygon b = new Polygon();
    b.addPoint(10, 20);
    b.addPoint(20, 20);
    b.addPoint(20, 30);
    b.addPoint(10, 30);I have try to use the Intersect function from Class Area, but this function cannot cover intersection on the border (like given sample polygon).
    Area c = new Area(a);
    c.intersect(new Area(b));
    System.out.println(!c.isEmpty());Thanks in advance

    warm regards,

    Stanley

    DB:2.89:Polygon Collision With Other Polygon jj

    hahahha... sorry for my stupidity Stas.
    in my code I forgot add ! "not" when I printed the result of BasicStroke.
    I'm so sorry Stas and Thank you so much for your help.
    Problem solve now yipiee.. :)

    warm regards,

    Stanley

  • RELEVANCY SCORE 2.89

    DB:2.89:Creating Polygons With An Array Of Doubles Instead Of Ints fs


    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

    DB:2.89:Creating Polygons With An Array Of Doubles Instead Of Ints fs

    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] );

  • RELEVANCY SCORE 2.88

    DB:2.88:Creating A Triangle Using Polygon Class Problem? z1


    Hi i am trying to create a triangle with the polygon class. If successful, the user should be able to click on the screen and triangles should appear.

    private Polygon[] m_polyTriangleArr;
    MainWindow()
    {
    m_polyTriangleArr = new Polygon[15];
    }
    class MouseCatcher extends MouseAdapter
    {
    public void mousePressed(MouseEvent evt)
    {
    Point ptMouse = new Point();
    ptMouse = evt.getPoint();
    if(m_nTrianglesDrawn m_nTrianglesToDraw)
    {

    int npoints = 3;
    m_polyTriangleArr[m_nTrianglesDrawn]
    = new Polygon( ptMouse.x, ptMouse.y, npoints);

    m_nTrianglesDrawn++;
    m_bMouse = true;
    repaint();
    }
    }
    }Paint section
    public void paint(Graphics gc)
    {
    if(m_bMouse)
    {
    gc.setColor(Color.green);

    for( int i = 0; i m_nTrianglesDrawn; i++)
    {
    gc.fillPolygon(m_polyTriangleArr.x, m_polyTriangleArr[i].y, npoints);
    }
    }

    }

    When i try to compile my code i get the following error message:
    Cannot find symbol constructor Polygon(int, int, int)
    --- find symbol variable x
    --- find symbol variable y
    --- find symbol variable npoints.

    Can som1 tell me why i have these error messages when i have already declared a Polygon object array and what i need to change please??

    DB:2.88:Creating A Triangle Using Polygon Class Problem? z1

    double posted

    http://forum.java.sun.com/thread.jspa?threadID=5126798tstart=0

  • RELEVANCY SCORE 2.88

    DB:2.88:Problem With Nested Svg And The Viewbox Attribute kd



    Hi!

    Can someone tell me, why I get a different result when i open the following svg file with Illustrator or with Firefox?

    ?xml version="1.0" encoding="UTF-8"?

    svg xmlns="http://www.w3.org/2000/svg"

    xmlns:xlink="http://www.w3.org/1999/xlink"

    xmlns:ev="http://www.w3.org/2001/xml-events"

    version="1.1" baseProfile="full"

    width="500px" height="500px"

    svg viewBox="0 0 2 2"polygon points="0,0 0,2 1,1" fill="red"//svg

    svg viewBox="0 0 2 2"polygon points="0,2 2,2 1,1" fill="yellow"//svg

    svg viewBox="0 0 12 12"polygon points="9,6 6,6 8,8" fill="red"//svg

    svg viewBox="0 0 36 36"polygon points="28,24 24,24 27,27" fill="red"//svg

    svg viewBox="0 0 660 660"polygon points="540,480 495,495 528,528 550,495" fill="red"//svg

    svg viewBox="0 0 168 168"polygon points="120,96 112,112 126,105" fill="yellow"//svg

    svg viewBox="0 0 72 72"polygon points="54,45 48,48 56,48" fill="blue"//svg

    svg viewBox="0 0 180 180"polygon points="140,120 135,135 144,126" fill="yellow"//svg

    svg viewBox="0 0 120 120"polygon points="90,75 96,72 90,70" fill="red"//svg

    svg viewBox="0 0 220 220"polygon points="176,154 165,165 180,160" fill="blue"//svg

    svg viewBox="0 0 90 90"polygon points="72,63 75,60 70,60" fill="red"//svg

    /svg

    Using Firefox or Chrome the file is displayed properly:

    http://mario0815.pytalhost.at/firefox.JPG

    but if I open it with Illustrator it's like the viewBox attribute is completely ignored or something:

    http://mario0815.pytalhost.at/illustrator.JPG

    DB:2.88:Problem With Nested Svg And The Viewbox Attribute kd


    Not an answer, but a quick solution: Place the .svg instead of opening it.

  • RELEVANCY SCORE 2.87

    DB:2.87:Remove Flicker 9p


    Hello,I have somme rushes in HDV with high contrast (white/brown, black). At the screen during the camera pan the luminous part of the image (white) seems to flicker. In FCP 7 there was a "de-flicker" filters to solve this problem, but nothing in FCP 10.1.Have somebody an advice?Thank you very much!

    DB:2.87:Remove Flicker 9p

    Hello,I have somme rushes in HDV with high contrast (white/brown, black). At the screen during the camera pan the luminous part of the image (white) seems to flicker. In FCP 7 there was a "de-flicker" filters to solve this problem, but nothing in FCP 10.1.Have somebody an advice?Thank you very much!

  • RELEVANCY SCORE 2.86

    DB:2.86:Did Apple Recall The Macbook For Flicker Problem? zp


    Hello, My macbookpro (for which I paid $3700) has a serious flicker problem. I am trying to figure out why Apple has not recalled it?

    DB:2.86:Did Apple Recall The Macbook For Flicker Problem? zp

    "My question is: Has apple recalled MacBooks?"As you had suggested, Google is your friend.

  • RELEVANCY SCORE 2.86

    DB:2.86:Improve Accuracy Of A Geographical Polygon 77


    Hi All,
    The situation is like:
    We have marked an area(POLYGON) with few points.{Say, it is POLYGON1}
    Later, user wanted to mark the land/ POLYGON again with much more points.{Say, it is POLYGON2}
    Now, we need to improve the accuracy of the polygon using all the points. Can we merge these two Polygons somehow to improve the accuracy?
    [The main problem I am facing is while creating a new polygon with all the points(lat,long) used in POLYGON1 and POLYGON2. Can't get the proper Ordering to find the polygon. We can't neglect the POLYGON1. How to deal with?]
    Any suggestion is appretiated. Thanks a lot in advance.
    Mayukh Roy

    DB:2.86:Improve Accuracy Of A Geographical Polygon 77

    But they both have a zig-zag, just in different directions! I'm not quite sure what you mean by uneven shapes, but the land plots I'm familiar with can certainly come in all sorts of unusual shapes.
    I'm afraid that I can't really understand your business rules as to how you want to reconcile the two sets of points, which is kind of crucial to being able to help answer your question.twitter: @alastaira blog: http://alastaira.wordpress.com/

  • RELEVANCY SCORE 2.86

    DB:2.86:Re: Select Polygon By A Point Inside. km


    Hi all,

    I am fighting with this problem since a long time.
    I wish to select the polygon by a point inside that polygon. I have searched this thread but can't get the solution.

    Please anyone help me.

    Rgds
    Kashu

    DB:2.86:Re: Select Polygon By A Point Inside. km

    Sorry if this has already been talked about. From what I understand
    1. You already know the polygon
    2. You've hatched the polygon (momentarily, that becomes Entlast)
    next, try this
    3. Explode the hatching, preferable one of horizontal lines.
    Note that each of these exploded lines is INSIDE the polygon and that each
    of these lines has a left endpoint and a right endpoint, each touching the
    polygon.
    Note that by calculation, each of these lines also has a midpoint.

    Perhaps these facts may help.
    Len
    --
    To email reply, eradicate all threes in my SPAM guarded address.
    wrote in message news:5265812@discussion.autodesk.com...
    Hi Adesu,

    I want to explain my problem....
    Actually I have a parcel map drawing (so you can imagine that there are a
    lots of adjoining polygons). I have cleaned the data created topology in
    the map. Now the next action is:
    1. Put a block on all centroids
    2. Create a hatch in each polygon (if the polygon has a centroid).
    3. To create a groups (each group contains centroid, block hatch).

    Now my problem is that I want that if my program select a point then it will
    autometically select the outer polygon so that I can use that polygon to
    create hatch.
    I have tried to catch the polygon by comparing the area of polygon the
    data attached on the point (created by the topology), but cant get success.

    Thx.
    kashu

  • RELEVANCY SCORE 2.86

    DB:2.86:Area Of A Polygon 1k


    I need to find out the area of the polygon. I know that it can be done through SDO_GEOM.AREA (geometry, dim_array), but the problem is I don't know where to get the value of dim_array ? Can any one give me the query to find it ? I also need help on searching a point within a plygon. to find area of a polygon lying in two polygons. for Eg. I wish to find out the area of a park that lies between two localities. Where Park the localities are both layers of polygon type.
    Thanks in advance !!
    null

    DB:2.86:Area Of A Polygon 1k

    Thanx dan,
    You are a life saver. Thanks to you, I am able to solve my problem.
    I need to learn more about oracle spatial, I have downloaded the training817 and it is indeed a great help.
    What I have to do is mark these points on a map using mapx. could you give me any idea how to show these points on the map? I could not find any help regarding the use of oracle spatial with Mapx (MapInfo). Can U guide me to some link where I can get some kind of help?

    Thanks again,
    Nitin.

  • RELEVANCY SCORE 2.85

    DB:2.85:Polygon Drawing Issue ss


    I have an application which allows the user to draw a polygon on the map. Everything works fine with one exception: I can not get the application to allow the user to place a new point in the interior of the current polygon. I tried adding
    an event handler for a mouse click on the polygon, but it doesn't seem to do anything.

    Before doing this application with Bing, I had been playing with Google maps, and there I just had to declare the polygon to be not clickable.
    Any ideas on how to handle this problem?
    Thanks

    DB:2.85:Polygon Drawing Issue ss

    Since at this point I do not want to do anything different if the user clicks in or out of the polygon, I have not bothered checking e.targetType. What I just realized is the problem lay with e.target.tryPixelToLocation() being valid for the map,
    but not for the polygon. I changed the call to map.tryPixelToLocation() and now it works how I want to.

  • RELEVANCY SCORE 2.85

    DB:2.85:Picking Problem fj


    Hi,
    I am rendering some polygons whose data is stored in a vector. Also the BranchGroups corresponding to the each polygon is stored in another vector.

    Now I need to pick the polygons and access the data stored in the polygon. Kindly suggest me some good focussed tutorials to achive this. I am new to Java3d.

    Plz help.

    DB:2.85:Picking Problem fj

    There is a pick demo using the new pick api in j3d 1.4 (unstable) at

    http://www.javadesktop.org/forums/thread.jspa?threadID=18558tstart=0

    That might help you.

    regards

  • RELEVANCY SCORE 2.85

    DB:2.85:Flicker Problem With Shadow And Highlights? xs



    Does Premiere CS6 have the same flicker problem when using Shadow and Highlights as CS5?

    DB:2.85:Flicker Problem With Shadow And Highlights? xs


    Does Premiere CS6 have the same flicker problem when using Shadow and Highlights as CS5?

  • RELEVANCY SCORE 2.83

    DB:2.83:Trouble With Texturing Multiple Polygon Duplicates m1


    hello everyone..i would like to ask... i have several same polygon in my scenes, so i decide to duplicate the polygons and arranged them nicely in my scene. Then I put mapping one of those polygon through uv mapping. The problem is my other polygon did not wraped well with the texture that i just made even there the same object. Did i have to duplicate the textured polygon and arraged them again?here i put my poligon that are wrong textured.. tetupaiWrong.jpg

    DB:2.83:Trouble With Texturing Multiple Polygon Duplicates m1

    And, irrelevant to the subject... As a matter of your privacy, I'd advise you not to send the whole screen picture instead show what you want to show. Download snagit software. It is the best screen capturing software I've known so far. Lot of options and very much user friendly. Try it.. Its worthier than trying.

  • RELEVANCY SCORE 2.83

    DB:2.83:How To View Stored Virtual Earth Mape cm


    hello friends
    i am cuting a polygon from virtual earth mape and then store it to database as a geography data type.
    then my problem is that
    i want to pick that stored polygon form database and then show on vitual earth mape.

    DB:2.83:How To View Stored Virtual Earth Mape cm

    Thanks for give me usefull tips
    but i am very new with spatial
    so can not displaying stored polygon on virtual earth mape.

    Please provie me source code or etc

  • RELEVANCY SCORE 2.83

    DB:2.83:Paint Natively With No Flicker k7


    Hello all.
    I want to draw natively on a awt canvas. The problem is that there is an anoyng flicker at the resize, but the rest works fine.
    It looks like the background is filling with black.
    Could you please tell me how could I avoid this flicker?
    Best regards,
    Cornel

    DB:2.83:Paint Natively With No Flicker k7

    In most situations the answer to flicker is double buffering, but since you are writing natively (from the OS?) then you will be using one of the blits in C, ASM, or another language. Why not go back and use the double buffering features of Java?

  • RELEVANCY SCORE 2.82

    DB:2.82:Laptop Screen Flicker Problem 91


    Inspiron E1705

    DB:2.82:Laptop Screen Flicker Problem 91

    well, for some reason it worked for about an hour, even with the ac adapter in, but now it's back to the same thing again. very annoyed.

  • RELEVANCY SCORE 2.82

    DB:2.82:Welding Of Vertices Problem 8x


    I created vertical wall of polygon floor of Surface polygon I want to Weld these wall vertices with Surface polygons vertices. I tried hard using all threshhold values of Weld Command. But in vain. Tell me method of weld these vertices.

    DB:2.82:Welding Of Vertices Problem 8x

    It would be best to add the modifier 'stl check' first before attaching any geometry , this will highlight any problems associated with the elements you wish to join. Once all has been rectified if any problems then target welding or collapsing vertices will be an easy task to accomplish

  • RELEVANCY SCORE 2.82

    DB:2.82:Trouble With Extrude Tool 71


    So I'm new to maya. I'm going through the getting started tutorial i got alway the way to page 124 and hit a snag in the Modling Guide. To move a vertex on the mesh in a direction normal to the mesh1Dolly and tumble the perspective view while examining the mesh until you find vertices that protrude outwards from the mesh in an unwanted fashion.2In the Toolbox, double-click the Move Tool to display the Move Settings editor.3In the Move Settings editor, in the Move section, turn on the Normal option.However, Normal is grayed out and unselectible. I made due and moved on, but again I hit another snag. Page 125:Drawing a polygonTo create the lower front region of the helmet (that is, the region that would protect the mouth and jaw of the wearer) you’ll create a polygon for the cross section of the lower front region by manually placing vertices using the Create Polygon Tool (Mesh Create Polygon Tool).To place vertices for a polygon1In the side view, select Mesh Create Polygon Tool .The Create Polygon Tool settings editor appears.2In the tool settings editor, set the following options:•Limit the number of points: On•Limit points to: 6These settings specify that a closed polygon face will be created once you have placed six vertices in the scene.3In the side view, place six points for the profile as it appears in cross section of the lower front region of the helmet (see image below). Ensure that you place the vertices in a counter-clockwise direction for this step.The new polygon face is created along the YZ plane (the axis of symmetry for the model).4Press the q key to quit the Create Polygon Tool when the polygon face is complete.The new polygon component remains selected in Object Mode.You’ll extrude this polygon face to create the remainder of the lower front region of the helmet. Before you can extrude the new face it needs to be selected in Face mode. You can do this quickly by converting the existing selection to Faces.NoteIf the polygon face doesn’t appear shaded in the side view but does appear shaded in the perspective view, it means that the polygon face and the image plane lie on exactly the same plane. You can correct this by moving the image plane backwards in the side view so it doesn’t lie directly on the YZ plane, but this step is not critical to the success of the steps that follow.Place six vertices to create the polygon face.123Getting Started with Maya1273 | Polygonal ModelingLesson 1 Extruding polygon componentsTo convert the object selection to face selection1With the face still active in Object Mode, choose Select Convert Selection To Faces.The selection is converted to a face selection.Extruding polygon componentsYou can create new polygon components from existing ones using the Extrude feature (Edit Mesh Extrude). When you extrude a polygon component (for example, a face, edge, or vertex), you create additional polygon components from the ones you selected. Using the Extrude feature you will:•Create the lower front region of the helmet by extruding the polygon face you created in the last section of the lesson.•Extrude edges around the face shield and along the lower bottom edge.To extrude the polygon face for the lower front region1Enlarge the scene view to a single perspective view.2With the polygon face still selected, choose Edit Mesh Extrude.The extrude manipulator appears on the selected face.3In the perspective view, drag the blue arrow on the manipulator to extrude a section of mesh out from the face (positive X) a distance of approximately one half a grid unit (see image).This is where i get stopped. The Extrude function will not work. I get nothing at all. Someone able to fill me in on the problem?

    DB:2.82:Trouble With Extrude Tool 71

    Ok nvm about this problem there was something messed up in the settings when i deleted userpref file it fixed the issue

  • RELEVANCY SCORE 2.82

    DB:2.82:What's Problem In My Code? j9


    Can anyone tell me what error that i have made in my code..

    case CanvasTextPanel.POLYGON:
    int xPoint[] = new Integer[xPol.size()];
    int yPoint[] = new Integer[yPol.size()];

    for(int count=0;countxPoint.length;count++)
    {
    xPoint[count] = ((Integer)(xPol.elementAt(count))).intValue();
    yPoint[count] = ((Integer)(yPol.elementAt(count))).intValue();
    }

    Polygon polygon = new Polygon(xPoint, yPoint, xPoint.length);
    s.setShape(polygon);
    s.setFilled(true);
    break;
    }
    thanx in advance!!!

    DB:2.82:What's Problem In My Code? j9

    Hi travis..thanx for ur reply..
    actually i couldnt draw a polygon in right way..as u can see my error of polygon..
    if possible could u plzzzz help me to come out with solution of this error..
    i couldnt think very well now..i'm really blurrr now..
    plz travis..
    i really need ur help!!!
    anyway, thanx for ur advice..

  • RELEVANCY SCORE 2.82

    DB:2.82:Youtube Flicker On Mac 10.6.6 zj



    problem watching videos in chrome, firefox but not safari.

    If i make the videos full screen,no flicker.

    DB:2.82:Youtube Flicker On Mac 10.6.6 zj


    Hi, Hi, you can go to this site and right click on the Flash logo, Settings, Display Settings. UNcheck the hardware acceleration.

    http://www.adobe.com/software/flash/about/See if this helps.

    Thanks,

    eidnolb

  • RELEVANCY SCORE 2.81

    DB:2.81:Slowing Down Arrow Keys When Drawing Geometric Shapes? 39



    I have a MacPro Intel 8-core with 16 GB RAM and running Mac OSX 0.5.6 and AICS4.

    I also use a WACOM Intuos3 Tablet.

    This is not a new problem - also happened with AICS3.

    When I try to draw a shape - say a polygon, or star, etc., the up/down arrow keys on the keyboard do add/subtract sides, vertexes, etc. as they should, but they won't increase/decrease in increments. For instance if I draw a 5 sided Polygon and tap the down arrow while using the polygon tool, instead of giving me a 4 sided polygon, I get a triangle. Conversly, if I tap the up arrow it jumps to maybe a 20 sided polygon, but no way to slow it down to get say a 10 sided polygon.

    Does anyone else experience this behavior. Is there a trick i am missing?

    DB:2.81:Slowing Down Arrow Keys When Drawing Geometric Shapes? 39


    It's a very common issue and primarily due to the WACOM drivers from what I see. There is no work around for it that I'm aware of, other than to unplug the tablet.

  • RELEVANCY SCORE 2.81

    DB:2.81:Covering Rectilinear Polygons With Axis-Parallel Rectangles xp


    Hello experts,

    I have the following problem:

    Given a rectilinear polygon (without interior holes), find the minimum number of rectangles covering it whithout overlapping. For example, the below polygon can be divided into 3 rectangles. The question is how to do it efficiently?

    *******
    * *
    *** *
    * *
    *** *
    * *
    *******/regards
    S?ren

    DB:2.81:Covering Rectilinear Polygons With Axis-Parallel Rectangles xp

    I thought about this a bit, and I don't know whether
    it can find the minimum partitioning for any
    rectilinear polygon (without holes, and no
    overlapping), but here is an algorithm:The algorithm works exactly because starting with the largest rectangle (of the rectangles formed in step 1 does not work i.e. Starting the merge process with the rectangle with the least number of concave corners prevents the splitting of a larger rectangle. This might prevent the formation of a larger rectangle, but will not split a rectangle. So, the goal of "minimum rectangles" will be met.

  • RELEVANCY SCORE 2.80

    DB:2.80:Kinect Mouse Flicker pj


    i have found the problem because of stream enable

    DB:2.80:Kinect Mouse Flicker pj

    Sorry, there's not enough information here to understand or answer your question. Please provide more detail.
    John
    K4W Dev

  • RELEVANCY SCORE 2.80

    DB:2.80:When Duplicate Is Not Smooth? d1


    Dear AnybodyI have problem when i duplicate polygon another side of model.The object is not smooth, it look like different model.I try to "combine" and "mesh" vertex from middle of object. but it still same.The polygon will smooth if i use "smooth tool".But i need low polygon for transfer map from high polygon to low polygon. but it not work, because low polygon look like different model.I need smooth low polygon, but not to much smooth.I need only when i duplicate polygon, it not look like different model is okay. Thank you for support

    DB:2.80:When Duplicate Is Not Smooth? d1

    Thank you so much. I was fortunate to have your support.

  • RELEVANCY SCORE 2.80

    DB:2.80:Problem With Converting Polygon To Subdiv Please Help 83


    Hi everyoneI have a little problemI have created half a bed. I then change it from a polygon to a subdivision. This goes well.However, when i copy half that bed along an axis of symmetry, using the Mesh Mirror Geometry tool, and join the verteces along the edges, the plane along which the bed is mirrored is irregular. Instead of a complete,smooth join,it is buckled. I have enclosed some .jpegs to show you guys what i mean.Hopefully,someone can help me with this problem. Thx in advance, Tom.

    DB:2.80:Problem With Converting Polygon To Subdiv Please Help 83

    hi, i'm not an expert in maya and i dont use subdivision, but did u try to use cleanup as it sais in the script editor ?and it might help people to understand the proplem more if u post and image for the mesh with the wirframe before and after the conversion

  • RELEVANCY SCORE 2.80

    DB:2.80:Hp Envy, 17: Windows 7 - 64bit: Screen Flicker 1c



    I too have this problem when I use any external monitor; despite being advised that I could run multiple monitors off of this laptop.

    How does one fix the screen flicker problem. I've had this since back when I first purchased the machine.

    Help!

    DB:2.80:Hp Envy, 17: Windows 7 - 64bit: Screen Flicker 1c


    In order to resolve this issue, I had to backoff the last BIOS update. I have not had the issue in many months. I really do not know what that updated BIOS was suppose to do in the first place and perhaps it was corrected in a later update, I do not know. I wish that I could be some feedback on the manufacture.

  • RELEVANCY SCORE 2.80

    DB:2.80:How Do I Fill A Polygon With An Image? d7


    I am new to JavaFX and trying to port a silverlight version of space invaders to java fx. In it I use a polygon filled with an image brush for the cover that the spaceship can hide under. The bombs from the aliens take pieces away from this polygon, so I need to be able to paint an image, clipped by a changing polygon. I can't see any equivalent to ImageBrush derived from the Paint class. Is there another way to solve this problem in JavaFX?

    DB:2.80:How Do I Fill A Polygon With An Image? d7

    You have to use a Container to clip the image:
    class Clipper extends Container
    {
    var arcSize: Number;
    init
    {
    clip = Path
    {
    elements:
    [
    MoveTo { x: 0, y: height }
    VLineTo { y: arcSize }
    ArcTo
    {
    absolute: false
    x: arcSize, y: -arcSize
    radiusX: arcSize, radiusY: arcSize
    sweepFlag: true
    }
    HLineTo { x: width - arcSize * 6 }
    ArcTo
    {
    absolute: false
    x: arcSize, y: arcSize
    radiusX: arcSize, radiusY: arcSize
    sweepFlag: true
    }
    VLineTo { y: height }
    ClosePath {}
    ]
    }
    }
    }

    def SIZE_X = 500;
    def SIZE_Y = 500;

    Stage
    {
    title: "Example"
    scene: Scene
    {
    width: SIZE_X
    height: SIZE_Y
    content:
    [
    Clipper
    {
    arcSize: 20
    width: 200
    height: 100
    translateX: 300
    translateY: 200
    content:
    [
    ImageView
    {
    image: Image
    {
    url: "{__DIR__}5.jpg"
    width: 120, preserveRatio: true
    }
    },
    ]
    }
    ]
    }
    }

  • RELEVANCY SCORE 2.80

    DB:2.80:Polygon Prob p9


    i have a problem i made a canvas that makes a polygon and after it is finished the program adds that to a vector.
    my problem is if i select the polygon how will it know that it is the polygon?

    DB:2.80:Polygon Prob p9

    If you mean what I think you mean then you need to cast. E.g. if your polygon is an instance of GeneralPath, you would use List polygons = new Vector();
    polygons.add(myGeneralPath);
    Iterator it = polygons.iterator();
    GeneralPath first = (GeneralPath)it.next(); // casting exampleAlternatively, you could get hold of Generic Java (JSR14), and use ListGeneralPath polygons = new ArrayListGeneralPath(); // I prefer ArrayList
    polygons.add(myGeneralPath);
    IteratorGeneralPath it = polygons.iterator();
    GeneralPath first = it.next();Note that in both cases I use it.next() without checking it.hasNext() only because I know for certain that the iterator does have another item.

  • RELEVANCY SCORE 2.80

    DB:2.80:Attendant Console Flicker fx



    I recently deployed the Attendant Console for my receptionists. We have been having an intermittent 'flicker' problem with the application, and it has been on several computers running both XP and Win2K. What we are getting is a flicker effect on all of the controls and windows within the Attendant Console window when moving the mouse. The receptionists are unable to answer the calls or transfer when it is in this state. Clicking on the desktop and then back in the attendant console window fixes the problem. Has anyone else seen this problem?

    DB:2.80:Attendant Console Flicker fx


    I've seen something very similar in the past. One of our customers ran into defect CSCeb31021 wherein the AC client would basically freak out and start shifting its internal window focus continuously and randomly.

    Check to see if you're running Attendant Console 1.2(1) with no ES postfix. You can see the version by going to the Help menu in the AC client; it'll tell you both server and client versions. The defect I'm describing is fixed in 1.2(1)ES1 and later.

    http://www.cisco.com/cgi-bin/Support/Bugtool/onebug.pl?bugid=CSCeb31021

  • RELEVANCY SCORE 2.80

    DB:2.80:Generic Use Of Varying Data 3j


    Need a strategy to genericallyoperate on different data sets with re-usable code. My attempt follows:
    void useDifferentData( short chooseDataSet )
    {
    if ( chooseDataSet == 0 )
    dataSet0 dataSet = new dataSet0(); //error: embedded statement cannot be a declaration or labeled statement
    if ( chooseDataSet == 1 )
    dataSet1 dataSet = new dataSet1(); //error: 'dataSet' already defined

    //use chosen dataSet.number;
    //use chosen dataSet.arraySet;
    //use chosen dataSet.polygonSet;
    }

    public class dataSet0
    {
    public dataSet0() //constructor
    {
    short number = 1;

    short[] array1 = { 3, 5, 7 };
    short[] array2 = { 9, 11, 13 };
    short[][] arraySet = { array1, array2 };

    Polygon poly1 = new Polygon();
    Polygon poly2 = new Polygon();
    //define polygon geometries
    poly1.Name = abc;
    poly2.Name = def;
    Polygon[] polygonSet = { poly1, poly2 };
    }
    }

    public class dataSet1
    {
    public dataSet1()
    {
    short number = 10;

    short[] array1 = { 30, 50, 70 };
    short[] array2 = { 90, 110, 130 };
    short[][] arraySet = { array1, array2 };

    Polygon poly1 = new Polygon();
    Polygon poly2 = new Polygon();
    //define polygon geometries - different than in dataSet0
    poly1.Name = ghi;
    poly2.Name = jkl;
    Polygon[] polygonSet = { poly1, poly2 };
    }
    }

    It may simply be a code organization/context problem...
    Since the different data sets are intended to be static, maybe structs would be better?
    Is there a simpler or better strategy to handle different data sets with the same code?
    Thanks for any suggestion...

    torpedo99

    DB:2.80:Generic Use Of Varying Data 3j

    The class examples you gave only create some variables in theconstructorof the class. So in your case you could use this as the interface

    interface IDataSet
    {

    }By same signature I mean both classes have to inherit from the same interface or class so you can place the 2 different type of classes in a variable

  • RELEVANCY SCORE 2.80

    DB:2.80:Problem With Findname dc


    Hi
    I am having problems getting values from .xaml file. In my .aspx page i have

    !-- Silverlight control--
    div
    id=mySilverlightControlHost

    /div
    script
    type=text/javascript
    var parentElement = document.getElementById(mySilverlightControlHost);

    createMySilverlightControl();
    /script
    !-- Find the Polygon collection points --

    script
    language=javascript
    type=text/javascript
    function getPoly() {
    // Get a reference to the Host itself
    var host = document.getElementById(mySilverlightControl);
    // Find a specific element
    var polyPoints = host.findName(1001).Points;
    // Show Polygon Points
    alert(Polygon Points polyPoints);
    }

    /script

    my xaml file has this

    Polygon
    x:Name=1001
    Points=200,200 200,500 500,500 500,200
    Stroke=Black
    StrokeThickness=1
    Fill=#669900
    StrokeDashArray=10 10 /

    Any ideas?
    Dylan

    DB:2.80:Problem With Findname dc

    And make sure the control has loaded – the control might not have parsed and loaded the XAML yet so the findname would not work yet. You can listen to the controls' OnLoad event to know when the control has loaded the XAMl.

    -mark
    Program Manager
    Microsoft
    This post is provided as-is

  • RELEVANCY SCORE 2.80

    DB:2.80:V7 Event On Polygon (Get The Id Or Something) 3k


    Hello everybody,
    I'm playing with the bing map API v7. I'm adding few polygon on the map- I've put the click event on all the polygon. BUt the problem is in the Handler, i've no Idea How to detect which poly has been clicked on ??
    In the v6.3 when i add a polygon there was the possibility to add an index and that idex was easily retrieved in the mouse handler, but with the v7 how ??
    I use map.entities.push(polygon) to add a polygon

    Thanks

    DB:2.80:V7 Event On Polygon (Get The Id Or Something) 3k

    There is no index property defined for the polygon class. I just added it in this line:
    triangle.index = 1;
    Unlike some languages, javascript allows you to dynamically create and assign any properties you want on an existing object.
    If you'd prefer, you could assign triangle.fruit = apple, and then retrieve the fruit property of each polygon in the callback :)Beginning Spatial with SQL Server http://www.apress.com/book/view/1430218290

  • RELEVANCY SCORE 2.80

    DB:2.80:Dvd Playback Flicker Dell M1730 jd



    Have a Dell XPS M1730 laptop, tried to play a DVD but I get alot of screen flicker, tried other DVD's same effect. Is this a hardware problem? The flicker occurs across the whole screen even when the DVD playback is windowed.

    Any help would be good.

  • RELEVANCY SCORE 2.80

    DB:2.80:Polygon Skewed During Rotation s1


    I'm trying to rotate a polygon using AffineTransforms createTransformedShape routine which returns a GeneralPath Shape.

    I then copy the points from each segment in the GeneralPath back to my polygon. After multiple redraws of the polygon in paintcomponent the polygon becomes skewed. Apparently I'm losing accurate point information during the copy and cast to (int).

    I've attached a short version of my code including the problem , and I'd REALLY prefer to keep my data points stored in a Polygon instead of changing the whole program to work with GeneralPath Shape instead.

    Is there a way I can fix this skewing problem? Please help,
    thanks.

    (press spacebar to view the skewed result when running the program)

    import java.awt.*;
    import java.awt.geom.*;
    import java.awt.event.KeyEvent;
    import java.awt.event.KeyListener;
    import javax.swing.*;

    public class PolygonRotation extends JPanel implements KeyListener{

    private static final long serialVersionUID = 1L;
    Polygon Polygon;
    Shape Poly;
    AffineTransform AT = new AffineTransform();
    PathIterator GPIterator;
    int SegmentType = 0;
    double[] PointsOnSegment = new double[6];

    protected void paintComponent(Graphics g){
    System.out.println("in paint component");
    super.paintComponent(g);
    Graphics2D g2 = (Graphics2D)g;
    g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
    RenderingHints.VALUE_ANTIALIAS_ON);

    g.setColor(Color.red);
    ((Graphics2D)g).fill(Polygon);
    }

    public void keyTyped(KeyEvent arg0) {
    // TODO Auto-generated method stub
    }

    public void keyReleased(KeyEvent arg0) {
    // TODO Auto-generated method stub
    }

    public void keyPressed(KeyEvent e) {
    System.out.println(e.getKeyCode());

    switch (e.getKeyCode()) {
    case 32: //spacebar
    rotate();
    break;
    default:
    break;
    }
    this.repaint();
    }

    public void rotate() {
    Point2D.Double p = getRotationPoint(Polygon);
    AT.setToIdentity();
    AT.translate(p.x, p.y);
    AT.rotate(Math.toRadians(45));
    AT.translate(-p.x, -p.y);
    //I must capture the rotated polygon as a Shape
    //(AT.createTransformedShape returns a GeneralPath)
    Poly = AT.createTransformedShape(Polygon);
    copyPath(Poly, Polygon);
    }

    private Point2D.Double getRotationPoint(Polygon poly){
    int x = poly.xpoints[1];
    int y = poly.ypoints[1];
    return new Point2D.Double(x, y);
    }

    private void copyPath(Shape path, Polygon poly){
    GPIterator = path.getPathIterator(AT);
    poly.reset();
    int tempx;
    int tempy;
    while (GPIterator.isDone() == false) {
    SegmentType = GPIterator.currentSegment(PointsOnSegment);
    tempx = (int)PointsOnSegment[0];
    tempy = (int)PointsOnSegment[1];
    if(SegmentType != 4){
    poly.addPoint(tempx, tempy);
    }
    GPIterator.next();
    }
    }

    private void initPolygon(){
    Polygon = new Polygon();
    Polygon.addPoint(300, 300);
    Polygon.addPoint(300, 400);
    Polygon.addPoint(350, 400);
    Polygon.addPoint(350, 300);
    }

    public static void main(String[] args){
    PolygonRotation pr = new PolygonRotation();
    pr.initPolygon();
    JFrame f = new JFrame();
    f.addKeyListener(pr);
    f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    f.getContentPane().add(pr);
    f.setSize(600,600);
    f.setLocation(200,200);
    f.setVisible(true);
    }
    }

    DB:2.80:Polygon Skewed During Rotation s1

    import java.awt.*;
    import java.awt.event.*;
    import java.awt.geom.*;
    import javax.swing.*;
    import javax.swing.event.MouseInputAdapter;

    public class HitTesting extends JPanel
    {
    Polygon[] originals;
    Shape[] shapes;
    int[] hitIndices;
    boolean showOriginals;
    final static int HIT = 1;
    final static int MISS = 0;

    protected void paintComponent(Graphics g)
    {
    super.paintComponent(g);
    Graphics2D g2 = (Graphics2D)g;
    g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
    RenderingHints.VALUE_ANTIALIAS_ON);
    if(originals == null)
    initVariables();
    if(showOriginals)
    for(Polygon p : originals)
    g2.draw(p);
    for(int j = 0; j shapes.length; j++)
    {
    Color color = Color.blue;
    if(hitIndices[j] == HIT)
    color = Color.red;
    g2.setPaint(color);
    g2.draw(shapes[j]);
    }
    }

    public void moveShape(int index, int dx, int dy)
    {
    AffineTransform at = AffineTransform.getTranslateInstance(dx, dy);
    Shape s = shapes[index];
    shapes[index] = at.createTransformedShape(s);
    repaint();
    }

    public void setSelections(int[] indices)
    {
    hitIndices = indices;
    repaint();
    }

    public void showOriginals()
    {
    showOriginals = !showOriginals;
    repaint();
    }

    private void initVariables()
    {
    originals = new Polygon[3];
    int w = getWidth();
    int h = getHeight();
    int R = Math.min(w,h)/8;
    int[][] xy = generateShapeArrays(w/4, h/4, R, 6);
    xy = generateShapeArrays(w*3/4, h/4, R, 3);
    originals[0] = new Polygon(xy[0], xy[1], 3);
    xy = generateShapeArrays(w*3/4, h*3/4, R, 4);
    originals[1] = new Polygon(xy[0], xy[1], 4);
    xy = generateShapeArrays(w/4, h*3/4, R, 5);
    originals[2] = new Polygon(xy[0], xy[1], 5);
    shapes = new Shape[originals.length];
    for(int j = 0; j originals.length; j++)
    shapes[j] = originals[j];
    hitIndices = new int[originals.length];
    showOriginals = false;
    }

    private int[][] generateShapeArrays(int cx, int cy, int R, int sides)
    {
    int radInc = 0;
    if(sides % 2 == 0)
    radInc = 1;
    int[] x = new int[sides];
    int[] y = new int[sides];
    for(int i = 0; i sides; i++)
    {
    x[i] = cx + (int)(R * Math.sin(radInc*Math.PI/sides));
    y[i] = cy - (int)(R * Math.cos(radInc*Math.PI/sides));
    radInc += 2;
    }
    // keep base of triangle level
    if(sides == 3)
    y[2] = y[1];
    return new int[][] { x, y };
    }

    public static void main(String[] args)
    {
    HitTesting test = new HitTesting();
    Mover mover = new Mover(test);
    test.addMouseListener(mover);
    test.addMouseMotionListener(mover);
    JFrame f= new JFrame("click and drag");
    f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    f.setContentPane(test);
    f.setSize(400,400);
    f.setLocation(200,200);
    f.setVisible(true);
    }
    }

    class Mover extends MouseInputAdapter
    {
    HitTesting hitTesting;
    int selectedIndex;
    Point start;
    boolean dragging;

    public Mover(HitTesting ht)
    {
    hitTesting = ht;
    dragging = false;
    }

    public void mousePressed(MouseEvent e)
    {
    if(e.getClickCount() == 2)
    hitTesting.showOriginals();
    Point p = e.getPoint();
    Shape[] shapes = hitTesting.shapes;
    for(int j = 0; j shapes.length; j++)
    {
    if(shapes[j].contains(p))
    {
    selectedIndex = j;
    start = p;
    dragging = true;
    break;
    }
    }
    }

    public void mouseReleased(MouseEvent e)
    {
    dragging = false;
    }

    public void mouseDragged(MouseEvent e)
    {
    if(dragging)
    {
    Point p = e.getPoint();
    int x = p.x - start.x;
    int y = p.y - start.y;
    hitTesting.moveShape(selectedIndex, x, y);
    start = p;
    int[] hitIndices = getCollisionState();
    if(stateHasChanged(hitIndices))
    hitTesting.setSelections(hitIndices);
    }
    }

    private int[] getCollisionState()
    {
    Shape[] shapes = hitTesting.shapes;
    int[] hits = new int[shapes.length];
    Area area = new Area();
    for(int j = 0; j shapes.length; j++)
    {
    Area target = new Area(shapes[j]);
    for(int k = j+1; k shapes.length; k++)
    {
    area.reset();
    area.add(new Area(shapes[k]));
    area.intersect(target);
    if(!area.isEmpty())
    {
    hits[j] = HitTesting.HIT;
    hits[k] = HitTesting.HIT;
    }
    }
    }
    return hits;
    }

    private boolean stateHasChanged(int[] indices)
    {
    int[] flags = hitTesting.hitIndices;
    for(int j = 0; j flags.length; j++)
    if(flags[j] != indices[j])
    return true;
    return false;
    }
    }

  • RELEVANCY SCORE 2.80

    DB:2.80:Lenovo Y50 Monitor Black Flicker Solved 19


    Nevermind. It was just a driver problem.

  • RELEVANCY SCORE 2.80

    DB:2.80:Problem With Screen Flicker dm



    Hi when i use my PS3 since the last update it seems to make the screen flicker when i try to play games. Watching movies like blurays works fine and so does everything else just not when i attempt to play a game. Please help as its quite frustrating ?







    Solved!
    Go to solution

    DB:2.80:Problem With Screen Flicker dm

    jrrwarlock wrote:I'm also have the same issue since the last update change the Hdmi cable and the RCA cable and still have the same problem I even did a quick format but no results

    Have you tried a different TV?




  • RELEVANCY SCORE 2.80

    DB:2.80:My Touchsmart 520 Screen Started To Flicker Flash mc



    Is there a driver problem or something else going on. After being on for a little while the screen starts to flash and flicker and blacks out and back on.

    DB:2.80:My Touchsmart 520 Screen Started To Flicker Flash mc


    Yes, in that case I would recommend visit in the service too.

  • RELEVANCY SCORE 2.79

    DB:2.79:Is My Point Inside The Polygon ? cc


    Hello !
    I have an irregular polygon (all its points are saved in an object Vector) and, when I clic with the mouse, I would like to know if it was inside or outside the polygon...

    I'm sure the method already exists, but I don't find it. Does anybody have the solution to this problem ?
    thanks !

    DB:2.79:Is My Point Inside The Polygon ? cc

    I would like to know if it was inside or outside the
    polygon...java.awt.Polygon.contains(Point p)

    Ulrich

  • RELEVANCY SCORE 2.79

    DB:2.79:Fittng The Bounding Box To Its Content sj


    hello every one
    i have problem in bounding box
    i have polygon with adorner to resize its lines but i want the bounding box of the polygon to fit the width and height of the polygon itself
    how can i do that ??

    DB:2.79:Fittng The Bounding Box To Its Content sj

    this simple application shows what the problem is (this Yves Zhang application but i modified it )

    https://skydrive.live.com/?cid=068215710BEF663Did=68215710BEF663D%21147sc=documents#
    Trigonometric demo

  • RELEVANCY SCORE 2.79

    DB:2.79:Jdialog Flicker zf


    I have problem with JDialog. When i close dialog it flicker twice.
    I read that java had some problems whit that.
    Some suggestion?
    Help me pleasa!

    DB:2.79:Jdialog Flicker zf

    ok, i am sorry for code tags.

    My problem is that if i have a lot of components on dialog, this dialog flicker twice.
    If i understand doublebuffering, swing first draw components in ram and then on the screen.

    The same problem is when i close this dialog.
    The rectangle on the main frame, where was dialog also flisker twice.

  • RELEVANCY SCORE 2.79

    DB:2.79:Point In Polygon s9


    Hi,
    I'm trying to find a nice solution to age old question - is this point inside a polygon? I've found an article that shows how to do it on Google Maps, but of course i'd much rather do this in Bing. The article is

    https://github.com/mattwilliamson/Google-Maps-Point-in-Polygon/blob/master/maps.google.polygon.containsLatLng.js
    Unfortunately the Polygon class in v7 doesn't have a getVertexCount method so this can't be ported directly. Has anyone cracked this problem using client-side code?
    Thanks for the help,
    MichaelWeb Developer MCTS SharePoint 2007 Developer

    DB:2.79:Point In Polygon s9

    And here's an age-old answer for you (well, 3 years old at least). The pointInPolygon() query about halfway down is what you want (you'll have to update it from v6.3 to v7):
    http://msdn.microsoft.com/en-us/library/cc451895.aspx

    And Polygon.getLocations().length will tell you the number of vertices in the polygon, by the way...
    twitter: @alastaira blog: http://alastaira.wordpress.com/

  • RELEVANCY SCORE 2.78

    DB:2.78:Polygon Problems... zx


    In my "space invaders" game, I store the polygon for the ship with coordinates like (0,0) (3,7) and (6,0). Then I have a method that converts them to the numbers in order to display it in the proper position in the window. Here is the code:

    //draw method in my ship class that draws the ship:
    public void draw(Graphics g, Canvas c)
    {
    g.setColor(shipColor);
    Polygon p = c.getAbsCoords(this, shipPoly);
    g.fillPolygon(p);
    }

    //method in Canvas class that converts the polygon to points relavive to the canvas:
    public Polygon getAbsCoords(MoveableObject m, Polygon p)
    {
    Polygon newPoly = new Polygon();
    newPoly.xpoints = new int[p.xpoints.length];
    newPoly.ypoints = new int[p.ypoints.length];
    for(int i=0; ip.xpoints.length; i++)
    {
    newPoly.xpoints[i] = p.xpoints[i] + (int)m.getPosX();
    newPoly.ypoints[i] = p.ypoints[i] + (int)m.getPosY();
    }
    return newPoly;
    }My problem is this. It will draw the polygon fine if I don't call the getAbsCoords method (I can set the coordinates to anything I want), but when I do call it, it will not display the polygon at all. I have even printed the coordinates of the new polygon out to the console and they are all fine. I don't know why it won't display. I would appreciate any help. Thanks.

    DB:2.78:Polygon Problems... zx

    OK, I figured it out. I had to set the npoints variable in my newPoly Polygon. It wouldn't draw it without that variable set for some reason. Thanks for your help though.

  • RELEVANCY SCORE 2.78

    DB:2.78:Eagle 6.0.0 Polygon Filling And Edge Deletion Problem 71



    Hi,

    Sorry - found another problem with 6.0.0 that wasn't there in 5.x.

    Basically, if you delete an edge rats-nested filled polygon, then the polygon doesn't visually update like it did in 5.11.0. Undo also suffers from problems too.

    Video is available from http://www.youtube.com/watch?v=dPD-Kevo7Zw

    Example 5.11.0 format file from http://www.tribbeck.com/misc/PolyRemove.brd.zip

    DB:2.78:Eagle 6.0.0 Polygon Filling And Edge Deletion Problem 71


    Hi,

    Sorry - found another problem with 6.0.0 that wasn't there in 5.x.

    Basically, if you delete an edge rats-nested filled polygon, then the polygon doesn't visually update like it did in 5.11.0. Undo also suffers from problems too.

    Video is available from http://www.youtube.com/watch?v=dPD-Kevo7Zw

    Example 5.11.0 format file from http://www.tribbeck.com/misc/PolyRemove.brd.zip

  • RELEVANCY SCORE 2.78

    DB:2.78:Spectre X2 Graphics Flicker jk



    Pictures consistently flicker, but text does not. I have upgraded the drivers to the latest. This is an HP Spectre 13t-h200 CTO x2 PC running Windows 8.1. This problem has existed since I received the laptop in January.

    DB:2.78:Spectre X2 Graphics Flicker jk


    Hello MamaRae

    Welcome to the HP Forums!

    I understand the screen flickers when viewing pictures, not text. I can do my best to help you out! First, I would like to address generic settings that would cause a computer screen to flicker. This article provides information on how to do this: How to Correct Monitor Flicker in Windows 8

    Please try these steps and let me know the results. If these steps do not resolve the issue, please provide a list of programs, with pictures, are open when the screen is flickering.

    Thanks and have a great day!

    Mario

  • RELEVANCY SCORE 2.78

    DB:2.78:Polygon Rotation af


    I have a Polygon that represents the bounds of a spaceship in my game, the spaceship image rotates ( this is an asteroids remake), and I need the bounds to do the same. Right now I have two Polygons one is of the Polygon located at the origin, the second is the actual location of the Polygon (the ships x and y are added to all the points). It seems like I need to copy the original Polygon (the one at the origin) rotate its points, set the second polygon equal to this (same polygon only at the ships actual location), restore the original polygon so I can use it later, then add the ship's x and y to the second polygon. If you know a better way, I'm open to suggestions. Problem is: I don't know the math to rotate each x and y point of the Polygon. Here is what I am using right now:

    public void updateBounds()
    {
    int[] temp1 = (int[])originalBounds.xpoints.clone();
    int[] temp2 = (int[])originalBounds.ypoints.clone();
    for (int i = 0; i originalBounds.npoints; i++)
    {
    originalBounds.xpoints[i] = Utils.rotateX((int)rotation, originalBounds.xpoints, originalBounds.ypoints [i], width);
    originalBounds.ypoints[i] = Utils.rotateY((int)rotation, originalBounds.xpoints[i], originalBounds.ypoints[i], height);
    bounds.xpoints[i] = originalBounds.xpoints[i] + (int)x;
    bounds.ypoints[i] = originalBounds.ypoints[i] + (int)y;
    }
    originalBounds.xpoints = temp1;
    originalBounds.ypoints = temp2;
    }

    and this is the code from Utils that does the actual rotation

    public static int rotateX(int rotation, int x, int y, int width)
    {
    return (int)(Math.cos(Math.toRadians(rotation))*x - Math.sin(Math.toRadians(rotation))*y);
    }

    public static int rotateY(int rotation, int x, int y, int height)
    {
    return (int)(Math.sin(Math.toRadians(rotation))*x + Math.cos(Math.toRadians(rotation))*y);
    }I draw the polygon (I'm using openGL, so the point 0, 0 is at the bottom left of the screen, the Y in Java2D is the inverse of this). Well anyway, this is giving me some very funky results, can anyone help me with the math or perhaps my entire algorithm is messed up...

    thanks in advance.

    DB:2.78:Polygon Rotation af

    by reading a good book on 2D (or 3D) transformations, reading a good book on your programming language of choice, and not reviving 4 year old forum threads to add your questions to them (that just annoys the heck out of people).

  • RELEVANCY SCORE 2.78

    DB:2.78:Polygon Dragging Problem xx


    Hi,

    I am working on Polygon ( with holes ) packing problem. The Polygons are displayed in JPanel. The paintingComponent() of the JPanel
    has been overridden to call drawLine() of each segment of a polygon. The Polygons are in real cooordinates, each having about 100 segments, and there are about 500 of them to be packed. A small fraction of the display in the JPanel is shown below.

    There is a serious perforamance probelm. When we drag a polygon, drawLine() of each polygon is called leading to unaccceptable repainting time. I tried with XOR mode also. There is an improvement but still way below the customer's expectations. Also, I am unable to give a clip area because a polygon can be dragged from one corner to another corner.

    Pls guide me.

    Ganesan
    ________________________________________________________________________________________________________
    | ____________________ _________________ ______________
    | | \ \ / / \
    | | \ \_____________/ /________________\
    | | \_____
    | | \
    | | _\ __________________
    | | / / |
    | | / / | ________________
    | |_________________________] | | | |
    | _________________________ | | | |
    | | ] | | | |
    | | \ \ | | \
    | | \_ \ | | \
    | | / | | | |_______
    | | / | | | | \
    | | ____ | | | | |__|_____/
    | | / \_______________| | /__|____/
    | | / | /
    | |____________________/ |__________________/
    |
    |
    ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    DB:2.78:Polygon Dragging Problem xx

    unfortunately, I couldn't make sence of the 'image' you provided. You might try the following... Lets say that your user has enterred the draggin opertaion. Render all the polygons into a BufferedImage except for the polygon(s) to be dragged. Then, with each mouse movement, you can simply copy the buffered image and then draw your polygon on top of it. That might be faster than redrawing all 50,000 line segments with each frame.

  • RELEVANCY SCORE 2.78

    DB:2.78:Qip 7232 P2 Flicker Issue sf



    Verizon Fios was installed about month a go. On Qip 7232 p2 DVR when I change channel bottom address bar flicker. I did manual reset. STB was reset by FSC also. Still I have the same problem. Yesterday service tech came and changed the STB but still problem did not resolved. Can you please let me know how to fix this problem.

    DB:2.78:Qip 7232 P2 Flicker Issue sf


    The guide bar down at the bottom that is flickeringnot the entireimage.When I change the channelthe guide bar down at the bottom flickering few times. This is happening on both standard channels and HD channels. I did changed 'SD Override' setting to '480p'and 'Stretch' but still guide bar down at the bottomflicker. I did Manuel Reset of Router and STB by unplugging the power cord. Still the same problem. I have another STB ( QIP 7100p2) which has no problem at all.

    Picture quality is very good on both STB.

  • RELEVANCY SCORE 2.77

    DB:2.77:Polygon Verbindet Nicht Mit Pad 8z



    Hallo zusammen,

    habe folgendes Problem: Ich will ein Polygon an 6 neben einander

    liegende Pads, welche einen Abstand von 0.2mm haben anschlieen. Das

    Polygon jedoch verbindet die Pads nur untereinander aber nicht mit dem

    Polygon selber. Muss ich irgendwas bei den DRC-Settings ndern? Ist es

    dem armen Polygon zu eng?

    Gruss

    Felix

    DB:2.77:Polygon Verbindet Nicht Mit Pad 8z


    Hallo zusammen,

    habe folgendes Problem: Ich will ein Polygon an 6 neben einander

    liegende Pads, welche einen Abstand von 0.2mm haben anschlieen. Das

    Polygon jedoch verbindet die Pads nur untereinander aber nicht mit dem

    Polygon selber. Muss ich irgendwas bei den DRC-Settings ndern? Ist es

    dem armen Polygon zu eng?

    Gruss

    Felix

  • RELEVANCY SCORE 2.77

    DB:2.77:How To Tell If Cursor Is Over A Polygon Or Its Pushpin fk


    I'm handling my own hover events for VEShapes, the problem is, I only want to handle the event if the cursor is currently over a pushpin, or the pushpin related to a polygon, not over the polygon itself.Is there any way to tell, from the arguments for onmouseover, if I'm currently over a polygon vs. the pushpin that has been added for the polygon? Thanks.

    DB:2.77:How To Tell If Cursor Is Over A Polygon Or Its Pushpin fk

    Looks pretty good, if you don't want the VE event to fire you return true;Windows Live Developer MVP - www.soulsolutions.com.au - follow http://twitter.com/virtualearth for latest VE news.

  • RELEVANCY SCORE 2.75

    DB:2.75:3dmax 2011 Polygon Selection Problem k9


    Here is my problem When im selecting a poly in my scene it for some reason reverts to selecting a Vertex and when I try selecting a vertex it selects the wrong one the same goes with edge and border. It also selects a wrong polygon when trying to select full model ill attach the scene as the youtube video I created to show isnt uploading for some reason.Thanks in advanced for any help.

    DB:2.75:3dmax 2011 Polygon Selection Problem k9

    nope didnt work something tells me its my hardware messing up as it keeps changing colour scheme. I also found out that the problem im having has something to do with the head and not the rest of the body looks like ill have to start the head over again lol. thanks for the help :#41;

  • RELEVANCY SCORE 2.75

    DB:2.75:Polygon Shape Not Closing With Brush In Illustrator Cc pk



    I am having a problem where I create a polygon shape and then apply a brush to it. But what I am getting is one corner is not closed or linked together. I have no idea how to fix this issue. Is there a way to solve this problem?

    DB:2.75:Polygon Shape Not Closing With Brush In Illustrator Cc pk


    I used the gradient method, took a bit but looks exactly what I wanted to get.

  • RELEVANCY SCORE 2.75

    DB:2.75:Create Convexhull Polygon Of Polygons In Table cj


    Hi,

    I have table that represent polygons and I have to create ConvexHull polygon. The problem is how to pick up all polygons from table into one geometry and then create a ConvexHull polygon!
    Thanks!

    DB:2.75:Create Convexhull Polygon Of Polygons In Table cj

    In SQL Server 2012, you can simply use the ConvexHullAggregate():
    SELECT geometry::ConvexHullAggregate(yourgeomcol)
    FROM yourtable;

    twitter: @alastaira blog: http://alastaira.wordpress.com/

  • RELEVANCY SCORE 2.75

    DB:2.75:Polygon Shape Tool Problem mc


    I'm having a problem with the polygon shape tool that i can't figure out. It will not drag to larger sizes like all the other shape tools. It just stay super small. Anyone know the solution to this problem?

    DB:2.75:Polygon Shape Tool Problem mc

    I have the same problem. When I drag, it stays about 4px by 4px. This is PS CS6. I took this screenshot while dragging.

  • RELEVANCY SCORE 2.75

    DB:2.75:3ds Max 2012 Curve Editor Problem c3


    I am animating a polygon mesh with bones using a CAT rig. Whenever I go to the Curve editor in order to change the Frames or Values in the Key Entry: Tack View, the tangent button icons start to flicker and I'm unable to type in a value with the keyboard for about 15-30 sec until the flickering stops.Never the less the mouse functions are still given and I can manipulate the tangents manually, but it's especially frustrating when I want to set the Global or Local Weights of the CAT rig to 100% or if I want to work proper.I have the SP1 and HF2 for 3DS 2012 installed.System Spec:Windows 7 Ultimate; 64 bit; SP1Intel Core i7 950 @3.07GHz12 GB RAMNVIDIA GeForce GTX 470So, I'd like to know if it's an issue with the program/version or the hardware.

    DB:2.75:3ds Max 2012 Curve Editor Problem c3

    I too am experiencing this exact same problem, was this ever solved?

  • RELEVANCY SCORE 2.75

    DB:2.75:Polygon z1



    Board is 98.6 % complete. Polygon fell apart?

    DB:2.75:Polygon z1


    Board is 98.6 % complete. Polygon fell apart?

  • RELEVANCY SCORE 2.75

    DB:2.75:Polygon Or Genelrapath m1


    I have a doubt...
    I have a cartesian coordinate system, where u can draw shapes.
    I started implementing shapes as generalpaths. But I found that editing generalpath's structure is not so simple (you must handle with pathiterator, if Im not wrong). So I try to find another way. I found that polygon class is perfect for my pourpose. The only problem is that i need float values, while Polygon uses arrays of integer to store coordinate values.

    So what do u suggest? Is it possibile to overrides polygon methods to accept floating values? Or It is better to continue using GeneralPaths?

    thanks

    DB:2.75:Polygon Or Genelrapath m1

    Note: this thread is a continuation of http://forum.java.sun.com/thread.jspa?threadID=670959messageID=3922123

  • RELEVANCY SCORE 2.74

    DB:2.74:Polygon-Lasso Stops While Working (Mac, Cs6) m8



    Hi, after a while of working with CS6 the polygon lasso just stops while using it. I can't finish the line and have to start again. This is so annoying - is there anybody with the same problem and did figure out what to do?? Thanks Christine

    DB:2.74:Polygon-Lasso Stops While Working (Mac, Cs6) m8


    Are you updated to CS6 vers. 13.0.6?

    Have you tried trashing Photoshop preference files?

    Do you have plenty of RAM, 8 GB or more?

    Do you have a physically separate, dedicated HD for Photoshop's scratch? If not do you have plenty of available hard disk space? Does your boot drive have at least 25% of its total capacity available as contiguous drive space?

  • RELEVANCY SCORE 2.74

    DB:2.74:What Is Causing This Rendering Problem? (Pic Attached) d1


    Polygon model with UVs laid out.

    DB:2.74:What Is Causing This Rendering Problem? (Pic Attached) d1

    we may need more info in order to give you an accurate response.It seems to be a UV issue though ...

  • RELEVANCY SCORE 2.74

    DB:2.74:Macbook 15" Retina Screen Flicker, Macbook 15" Retina Screen Flicker? ks


    MBPR sreen flickers constantly, I have seen video of partial screen flicker but my entire screen does this. Has anyone had this problem and what was the fix.

    DB:2.74:Macbook 15" Retina Screen Flicker, Macbook 15" Retina Screen Flicker? ks

    SkiffX: You could be right as I have noticed that mine has got progressively worse and now I can reliably show the screen flicker If i'm watching online videos on youtube etc or BBC iplayer or anything that uses the internet using my WiFi. Gonna take it into Apple after the holiday season

  • RELEVANCY SCORE 2.74

    DB:2.74:Problem With Sdo_Within_Distance Function 73


    Hi

    I am using a polygon select tool to query my database for all features with a user-defined polygon. I am having problems in that the query returns results except where my polygon has 5 points eg.

    SELECT * FROM POINT PT,POINT_TYPE PTY
    WHERE SDO_WITHIN_DISTANCE
    (PT.geoloc, mdsys.sdo_geometry(2003,NULL,NULL, mdsys.sdo_elem_info_array(1,1003,1),
    mdsys.sdo_ordinate_array
    (528302,178901,
    528797,178899,
    528797,178439,
    528515,178439,
    528305,178439)),'distance = 0.1') = 'TRUE' AND PT.PTY_PTY_ID = PTY.PTY_ID

    returns no records. However if I define the same polygon with an additional point that does not affect the shape of the polygon i.e

    SELECT * FROM POINT PT,POINT_TYPE PTY
    WHERE SDO_WITHIN_DISTANCE
    (PT.geoloc, mdsys.sdo_geometry(2003,NULL,NULL, mdsys.sdo_elem_info_array(1,1003,1),
    mdsys.sdo_ordinate_array
    (528302,178901,
    528797,178899,
    528797,178662,
    528797,178439,
    528515,178439,
    528305,178439)),'distance = 0.1') = 'TRUE' AND PT.PTY_PTY_ID = PTY.PTY_ID

    there are results returned.

    What could be the cause of my problems ?

    DB:2.74:Problem With Sdo_Within_Distance Function 73

    A rule for polygons is the first coordinate and the last coordinate must be the same (as defined in the OGC standard).

    If you try closing the polygon, hopefully it will work without the "extra" vertex.

  • RELEVANCY SCORE 2.74

    DB:2.74:Framerate Problem Unity Iphone xk



    Alright guys, the polygon count was the problem. with a different model that has been decreased in polygons, my project runs at stable 200 fps.


    thanks for your answers.


    h4wkeye

    DB:2.74:Framerate Problem Unity Iphone xk


    Alright guys, the polygon count was the problem. with a different model that has been decreased in polygons, my project runs at stable 200 fps.


    thanks for your answers.


    h4wkeye

  • RELEVANCY SCORE 2.73

    DB:2.73:Xps Geforce 7900 Gs Nv4_Disp Error s8


    I have had my XPS 410 for almost a year now and I have noticed developing problems with the video. It is an Nvidia GeForce 7900 GS PCI-Express card. The first problems I noticed were little colored speckles during boot and reboot on the BIOS screen and Windows loaind screen. This would seem to indicate something wrong with the hardware and not the drivers since the drivers don't even come into play until the OS loads. However, I began to see more graphical glitches such as polygon warps and texture corruption in OpenGL type games. The screen would sometimes freeze or flicker, then I would get a blue screen indicating something wrong with nv4_disp.dll. I downloaded the latest drivers for my card and even diagnostics, but oddly enough, the latest drivers seemed to make the problem worse. I tried booting into safe mode, deleting the old drivers manually, uninstalling them manually, then installing them, but always the same result is graphical glitches, freezing, and enevitably the blue screen. Is there a known issue with these cards being defective and should I just call Dell Support with this or is there something I'm missing? Can anyone tell me because I bought this PC for gaming and its extremely frustrating.

    DB:2.73:Xps Geforce 7900 Gs Nv4_Disp Error s8

    And to add to the subject: Type in the Search the Forum box(upper left side of this page) 7900GS

  • RELEVANCY SCORE 2.72

    DB:2.72:Rotate Transform For Polygon cm


    Hi everyone, I have an issue with adding rotatetransform to WPF Bing map MapPolygon. When I add rotate transform to MapPolygon through render transform, the polygon doesn't stick to the map but floating. When I remove rotate transform, the polygon
    sticks to the map. So could you please tell me what the problem is? Thanks a lot.

    DB:2.72:Rotate Transform For Polygon cm

    RenderTransforms are not supported on the MapPolygon class. The points of the polygon are tied to specific coordinates that you specified in the Location property. When ever the map is moved these coordinates are used to calculate the new pixel locations
    of the MapPolygon using a render transform that is built into the MapPolygon class. If you use a RenderTransform of your own you override the built in render transform which causes it to do what you are seeing.

    If you need to edit a polygon using a mouse and want to be able to rotate it, there is something you could try. You can let the user select the polygon to edit it. When a polygon is select grab the location coordinates and convert them to pixel coordinates
    by using the maps TryLocationToViewport method. Use the pixel coordinates to create a standard Polygon object and add it to the map. From here you can le the use a RenderTransfrom on the new Polygon, this could be a hard coded value or something they can set
    using a slider or some other mouse event. When they ware doing this they will be able to see the original polygon as well, you could consider this a preview of the before/after. When done with rotating you can then use the maps TryVeiwportToLocation method
    convert the polygon pixel coordinates back into a LocationCollection and then pass this into your MapPolygons Location property.

    Another method, if you need to do all of this programmatically without using the map is to do a lot of math and manually rotate the polygon.http://rbrundritt.wordpress.com

  • RELEVANCY SCORE 2.72

    DB:2.72:Why Does My Numeric Control Flicker? p9



    I have the most simple VI attached to demonstrate this problem. Why does my numeric control flicker?

    More importantly, how can I stop this annoying flickering?







    Solved!
    Go to Solution.

    DB:2.72:Why Does My Numeric Control Flicker? p9

    bmihura wrote:

    Again, don't waste your time on it unless you want $100 PayPal and waste a lot of time on these forums.

    Sorry, not to be rude, but what the hell does this mean?




    CLA, LabVIEW Versions 2010-2013

  • RELEVANCY SCORE 2.71

    DB:2.71:Polygon Split Edges Tool Problem a7


    I am having problems getting the Polygon Split Edges Tool in Maya 7.1 to deselect an edge after completing use. I have tried clicking on the select button and going back to object mode with no luck. I have to close Maya and reopen it to continue. Otherwise, I can't do anything else. What am I doing wrong?Thanks

    DB:2.71:Polygon Split Edges Tool Problem a7

    Happens to me often. Just go into edge selection mode, select ALL of the edges, then deselect.



    22in Samsung T220 flatscreen and 17in. Dual SetupIntel Core 2 Quad Q6700 2.7 Ghz4gb DDR2NVIDIA GeForce 8600 GTWacom Intuos 3 Tablet and PenWindows Vista Home PremiumMaya 2008 UnlimitedCombustion 2008Photoshop CS4 ExtendedCleaner XL

  • RELEVANCY SCORE 2.71

    DB:2.71:Get A Object To Basicly Work As A Polygon? 3x


    I need some help with a problem I got. I want a class to extend/inherit/derive polygon, but this is not posible since Polygon is sealed. I have some properties I need to have in the Polygon like ID, Name and Parent Polygon (Would contain the same class).
    What Ineed is a class that basicly work as a polygon class, but has the extra properties.I also need it to be a UIElement so I can add it into a Canvas and other uses. The question is, how should I make this class, should it extend from Shape as Polygon
    does? How will I be able to paint the class?Is there anything like in Windows form where you can override paint, in silverlight?
    Any answer and code example would be very much appriciated!
    Cheers
    Arne

    DB:2.71:Get A Object To Basicly Work As A Polygon? 3x

    Yes that works, and that is how I'm doing it now. However it results in much extra and unnececary code, as I can't just simply override the paint metode and paint the polygon from the class it contains within. I'm also adding it to a combobox and such so
    it looks really like a spaghetti code now.

  • RELEVANCY SCORE 2.71

    DB:2.71:5150 Flicker Problem And The New Bios A28 ? xf



    Any one tried to see if the new a28 bios reduces the flicker problem in the 5150 ?

    I say this because the a28 fixes some battery charging problem..... maybe that solves the flicker problem many have (myself included).

    I will try my theory next weekend.

    DB:2.71:5150 Flicker Problem And The New Bios A28 ? xf


    A28 fixed my flicker problem.

    I used to have the A01 BIOS. At the lowest brightness if I started the system on battery, I would get flicker from the monitor. If I stepped up the brightness by one, it would get significantly brigther and I could not step all the way down to the lowest brightness that I got (but I would no longer see flicker). Now brightness can be defined by whether it is plugged in or not and the brightness fluidly steps up and down through user setting.

    -MistrBlank

  • RELEVANCY SCORE 2.71

    DB:2.71:How To Get All The Object Of Polygon Inside The Canvas... 1f


    Hi ..
    I have one image of face.on that image i have put some polygon to identify some part of face.....by default i have set all the polygon opacity as 0.00001
    On click of check box it shows all the polygon on face.....and i have to make opacity as 0.1 so it should be visible to user.....

    now my problem is here i can identify all the checkbox by it's Name property and i can set opacity....
    but number of polygon are more let me say for face. it is more that 50....and i have to do this for whole body...

    so is there any way to identify all the polygon object and with help of for each loop i can set opacity for that polygon object..
    below is my code for .XAML file...

    Canvas x:Name=Face Visibility=Visible
    TextBlock x:Name=textmenu3 Canvas.Left=120 Canvas.Top=4 FontSize=14 Foreground=Orange Text=New Potential Job FontFamily=Arial Black Visibility=Visible/

    Image x:Name=MyImage Canvas.Left=50 Canvas.Top=50 MouseLeftButtonDown=MyImage_MouseLeftButtonDown Source=../Image/Face.jpg Stretch=None
    /Image
    Polygon x:Name=Above_Left_Eye MouseEnter=Polygon_MouseEnter MouseLeftButtonDown=Polygon_MouseLeftButtonDown Points=126 212,152 205,187 210, 190 190, 151 186,126 196 Stroke=White Fill=White Opacity=.00001 StrokeThickness=1 /
    Polygon x:Name=Middle MouseEnter=Polygon_MouseEnter MouseLeftButtonDown=Polygon_MouseLeftButtonDown Points=192 192,191 207,206 213,227 206,220 192 Stroke=White Fill=White StrokeThickness=1 Opacity=.00001 /
    Polygon x:Name=Above_Right_Eye MouseEnter=Polygon_MouseEnter MouseLeftButtonDown=Polygon_MouseLeftButtonDown Points=228 192,230 205,260 202,278 205,290 215,287 195,261 188 Stroke=White Fill=White StrokeThickness=1 Opacity=.00001
    /
    /Canvas

    here i have put only three polygon but in real it should be more that 50....

    thanks...

    DB:2.71:How To Get All The Object Of Polygon Inside The Canvas... 1f

    Ya thanks for ur post...
    But i have to put one small rectangle on particular polygon and...also on mouse over i have to display that polygon name(here that polygon name)...in one textblock...so i think if i make that polygon invisible i can not do this requirement..,,or still i
    will check your suggestion...

    thanks

  • RELEVANCY SCORE 2.70

    DB:2.70:I Am Experiencing A Problem Which The Inside Faces Of A Polygon Does Not Show When I Render The Result. kp


    let's put my problem in a simpler term -- i have created a box, then deleted the top polygon so that it is an open box, when i render the picture, only the outer surfaces of the box were shown, the inner surfaces disappeared. Why is it so? and how can I fix the problem?? I need help so badly. thanks in advance.

  • RELEVANCY SCORE 2.70

    DB:2.70:Creating A Triangle Using Polygon Class Problem, Urgent?? 9z


    Hi i am creating a triangle using polygon class which will eventually be used in a game where by a user clicks on the screen and triangles appear.

    class MainWindow extends Frame
    {
    private Polygon[] m_polyTriangleArr;
    MainWindow()
    {
    m_nTrianglesToDraw = 0;
    m_nTrianglesDrawn = 0;
    m_polyTriangleArr = new Polygon[15];
    addMouseListener(new MouseCatcher() );

    setVisible(true);
    }
    class MouseCatcher extends MouseAdapter
    {

    public void mousePressed(MouseEvent evt)
    {
    Point ptMouse = new Point();
    ptMouse = evt.getPoint();

    if(m_nTrianglesDrawn m_nTrianglesToDraw)
    {

    int npoints = 3;

    m_polyTriangleArr[m_nTrianglesDrawn]
    = new Polygon( ptMouse[].x, ptMouse[].y, npoints);
    }
    }

    }
    }When i compile my code i get the following error message:

    Class Expected
    ')' expectedThe two error messages are refering to the section new Polygon(....)
    line. Please help

    DB:2.70:Creating A Triangle Using Polygon Class Problem, Urgent?? 9z

    I expect the size of each triangle to be something like this:

    int xpoints[] = {25, 145, 100}; // used to create a triangle code
    int ypoints[] = {25, 25, 145};

    int npoints = 3;

  • RELEVANCY SCORE 2.70

    DB:2.70:Polygon Coordinates cj


    Hi,

    I have a bit of a maths problem in determining coordinates for a polygon.

    I am using drawPolygon (int[] x, int[]y, numpoints)

    I have the centre point and 1st apex as well as the radius of the polygon. How can I determine the other coordinate points?

    Does anyone have an idea?

    Thank you.

    DB:2.70:Polygon Coordinates cj

    Use Math.sin Math.cos to get your coordinates ...

    import java.awt.*;
    import java.awt.geom.*;
    import javax.swing.*;
    import javax.swing.event.*;

    public class Polygon extends JPanel {

    private int numPoints = 3;
    private int radius = 10;
    private JSpinner pointsSpinner;
    private JSpinner radiusSpinner;

    public Polygon () {
    setBackground ( Color.WHITE );
    } // Polygon constructor

    protected void paintComponent ( Graphics _g ) {
    super.paintComponent ( _g );
    Graphics2D g = (Graphics2D)_g;

    g.setRenderingHint ( RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON );

    g.translate ( getWidth() / 2, getHeight() / 2 );

    double fullCircle = 2*Math.PI;
    double increment = fullCircle / numPoints;

    int[] xPoints = new int[numPoints];
    int[] yPoints = new int[numPoints];

    for ( int i=0; inumPoints; i++ ) {
    double angle = i * increment;
    double x = radius * Math.cos ( angle );
    double y = radius * Math.sin ( angle );
    xPoints[i] = (int)x;
    yPoints[i] = (int)y;
    } // for
    g.drawPolygon ( xPoints, yPoints, numPoints );

    g.setRenderingHint ( RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF );
    } // paintComponent

    public Container getUIPanel () {
    SpinnerModel pointsModel = new SpinnerNumberModel (
    numPoints // initial
    ,3 // min
    ,20 // max
    ,1 // step
    );
    pointsSpinner = new JSpinner ( pointsModel );
    pointsSpinner.addChangeListener ( new spinnerTracker() );

    SpinnerModel radiusModel = new SpinnerNumberModel (
    radius // initial
    ,10 // min
    ,100 // max
    ,1 // step
    );
    radiusSpinner = new JSpinner ( radiusModel );
    radiusSpinner.addChangeListener ( new spinnerTracker() );

    Box panel = Box.createHorizontalBox ();
    panel.add ( new JLabel ("Points:") );
    panel.add ( pointsSpinner );
    panel.add ( new JLabel ("Radius:") );
    panel.add ( radiusSpinner );
    return panel;
    } // getUIPanel

    //----------------------------------------------------------------------------
    // numPointsTracker
    //----------------------------------------------------------------------------
    private class spinnerTracker implements ChangeListener {
    public void stateChanged ( ChangeEvent e ) {
    JSpinner source = (JSpinner)e.getSource();
    if ( source == pointsSpinner ) {
    Integer i = (Integer)source.getValue();
    numPoints = i.intValue ();
    } // if
    if ( source == radiusSpinner ) {
    Integer i = (Integer)source.getValue();
    radius = i.intValue ();
    } // if
    repaint();
    }
    } // numPointsTracker

    //----------------------------------------------------------------------------
    // main
    //----------------------------------------------------------------------------
    public static void main ( String[] args ) {
    JFrame f = new JFrame ( "Polygon" );
    f.setDefaultCloseOperation ( JFrame.EXIT_ON_CLOSE );
    Polygon app = new Polygon();
    f.getContentPane().add ( app );
    f.getContentPane().add ( app.getUIPanel(), BorderLayout.SOUTH );
    f.setSize ( 300, 300 );
    f.setVisible ( true );
    } // main

    } // Polygon

  • RELEVANCY SCORE 2.70

    DB:2.70:Re: Text Disappears In Polygon Viewport xc


    I have a visual problem.

    My text becomes invisible in paperspace when I zoom into it. If I zoom out, till it is unreadable then I can see it. This only occurs in a polygon viewport. Normal rectangular viewports have no problem.

    None of this affects how it plots.

    Any ideas ?

    DB:2.70:Re: Text Disappears In Polygon Viewport xc

    Works for me too.....disables the aero glowy stuff temporarily

  • RELEVANCY SCORE 2.70

    DB:2.70:Polygon Sphere fd


    Hi,

    I have a problem!
    I need to construct a polygon sphere and I have that to have access to the some vertex that form it.
    Somebody has some tip? It can help me?

    thanks,
    Renata.

    DB:2.70:Polygon Sphere fd

    Hi,

    Check out
    http://coli.lili.uni-bielefeld.de/~milde/java3d/examples/src/com/sun/j3d/utils/geometry/Sphere.java
    especially the constructor

    It's the Sphere class from j3d.utils, this Sphere is made with quad strips.
    This code will teach you how to create a sphere geometry which is always easier while dealing with sperical coordinates, otherwise you'll have to try catch HumanBrainExceptions ;oP
    From that point it'll be possible to construct a sphere with triangles too, why not.

    Best Regards and Happy New Year !

  • RELEVANCY SCORE 2.70

    DB:2.70:Why Cant I Leave Comments In Flicker With Ff 15.Xx js



    Every time FF updates to 15.xx I cannot leave comments on Flicker pages. I deleted 15.xx twice and reloaded 14.xx and the comments work fine. There is a problem with 15.xx and Flicker. Please fix it.

    DB:2.70:Why Cant I Leave Comments In Flicker With Ff 15.Xx js



    I just noticed that you posted this same issue and received the same suggestion before: Latest upgrade will not allow comments in flickr.

    In that thread you explained further:

    When I click in the comment box the cursor goes to the beginning of the message "ADD COMMENT HERE....Etc" but I cannot do anything. Normally as soon as you click in the box the message goes away and then you can type. I cannot even click and drag to highlight the message.

    Please note that Firefox 15 changed the behavior around "placeholder" text in form fields. That text doesn't disappear until you type at least one character. More discussion and a workaround in this thread: Installed Firefox 15 Cursor will go only to beginning of text boxes.

  • RELEVANCY SCORE 2.70

    DB:2.70:Problem With Direction Of Points In Sdo_Ordinate_Array 7c


    i have created a polygon selection tool to create a polygon . I use sdo_relate function to get another point geometry from the polygon.

    SELECT a.cust_id
    FROM T_S_CUSTOMERS a
    WHERE SDO_RELATE(a.geometry,SDO_GEOMETRY(2003, 8307, NULL,
    SDO_ELEM_INFO_ARRAY(1,1003,1),
    SDO_ORDINATE_ARRAY("+lstcoordinates+")),
    'mask=anyinteract querytype=window') = 'TRUE';

    I want to find cust_id from this polygon .If i draw the polygon in anti clock wise direction , the query works but if i draw the polygon in clockwise direction , the query fails .
    Since the polygon will be drawn by user at the front end , I cannot restrict the direction in which user draws the polygon .User can also start drawing the polygon in clock wise direction then shift to anti clock wise direction to complete it. Is there any way
    through which i can get the result irrespective of user direction sense .

    DB:2.70:Problem With Direction Of Points In Sdo_Ordinate_Array 7c

    The easiest way to ensure the polygon is counter-clockwise is to use this:

    SDO_MIGRATE.TO_CURRENT(
    geom IN SDO_GEOMETRY,
    dim IN SDO_DIM_ARRAY
    ) RETURN SDO_GEOMETRY;

    Example:

    SELECT sdo_migrate.to_current (SDO_GEOMETRY (2003,
    8307,
    NULL,
    sdo_elem_info_array (1, 1003, 1),
    sdo_ordinate_array (1, 1, 1, 2, 2, 2, 2, 1, 1, 1)
    ),
    sdo_dim_array (sdo_dim_element ('Longitude', -180, 180, .05),
    sdo_dim_element ('Latitude', -90, 90, .05)
    )
    ) ccgeom
    FROM DUAL;

    CCGEOM(SDO_GTYPE, SDO_SRID, SDO_POINT(X, Y, Z), SDO_ELEM_INFO, SDO_ORDINATES)
    -----------------------------------------------------------------------------------------------------------------------
    SDO_GEOMETRY(2003, 8307, NULL, SDO_ELEM_INFO_ARRAY(1, 1003, 1), SDO_ORDINATE_ARRAY(1, 1, 2, 1, 2, 2, 1, 2, 1, 1))

  • RELEVANCY SCORE 2.69

    DB:2.69:Screen Is Unreadable Starts To Flicker In Windows Xp Computer. zk


    Original Title: my monitor problem.
    when starting windows the screen is unreadable as you get signed on the screen starts to flicker. working with the display settings moving the resolution up one and still flicker. help!!!!

    DB:2.69:Screen Is Unreadable Starts To Flicker In Windows Xp Computer. zk

    Hi dondougan,

    Did you make any software or hardware changes on the computer prior to this issue?

    You may download and install the latest display adapter driver from the manufacturer’s website. Thereafter, check if the issue persists.
    For more information, refer to this link: How to manage devices in Windows XP
    Hope the information helps.
    Please post back and let us know.

  • RELEVANCY SCORE 2.69

    DB:2.69:Event On Polygon (Get The Id Or Something) 1s


    Hello everybody,
    I'm playing with the bing map API v7. I'm adding few polygon on the map- I've put the click event on all the polygon. BUt the problem is in the Handler, i've no Idea How to detect which poly has been clicked on ??
    In the v6.3 when i add a polygon there was the possibility to add an index and that idex was easily retrieved in the mouse handler, but with the v7 how ??
    I use map.entities.push(polygon) to add a polygon

    Thanks

    DB:2.69:Event On Polygon (Get The Id Or Something) 1s

    Bonjour,

    Je vous prie de traduire votre message et de continuer la discussion en Franais, pour pouvoir bnficier des rponses
    de la communaut MSDN France.

    Cordialement,

    Alex

    ________________
    Publiez
    un article sur MSDN!

    Windows Phone 7
    Astuces pour Visual
    Studio 2010
    XNA
    Dveloppement jeux vido
    Didacticiels et astuces:
    VB.NET,
    C#,
    ASP.NET,
    .NET Framework,
    Silverlight,
    Workflow Foundation,
    SharePoint,
    WPF
    Microsoft propose ce service gratuitement, dans le but d'aider les utilisateurs et d'largir les connaissances gnrales lies
    aux produits et technologies Microsoft. Ce contenu est fourni tel quel et il n'implique aucune responsabilit de la part de Microsoft.

  • RELEVANCY SCORE 2.69

    DB:2.69:The Screen Flicker Problem When Playing A Video j8



    Firefox 34.0 on Android

    DB:2.69:The Screen Flicker Problem When Playing A Video j8

    Question owner


    please reply !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!