Shape rotation question

i am wondering how to rotate a shape, such that I can still check for intersections, etc, with the shape in it's rotated state. I know Graphics2D has a rotate method, but that wouldn't allow me to check for an intersection between a rotated rectangle (e.g 45 degrees around central axis) and an ellipse2d.
can AffineTransform or PathIterator help?

thanks fred, that might be just what I need. Can someone confirm this psuedocode:
1. Convert shape to Area
2. Create AffineTransform and rotate it by x radians
3. Set transform of Area to affinetransform
4. Call intersects method of ellipse
thanks

Similar Messages

  • How to make shape rotation at it's center point?

    I draw a shape,like follows:
    var shape1:Shape;
    shape1=draw();
    addChild(shape1);
    shape1.rotation=50;
    private function draw():Shape{
       var shape:Shape = new Shape();
       shape.graphics.beginFill(0x00FFFF);
       shape.graphics.moveTo(200,200);
       shape.graphics.lineTo(300, 202);
       shape.graphics.lineTo(200, 204);
       shape.graphics.lineTo(100, 202);
       shape.graphics.lineTo(200, 200);
       return shape;
    Then I want to rotate the shape at it's center point(200,202) by using shape1.rotation=50,but I find the shape don't rotate at the the center of it's shape. How to realize the function which make shape rotate at its center point?
    Thanks

    Here is a sample to make it rotate from center:
    var sprite:Sprite=new Sprite();
    sprite.graphics.lineStyle(3,0x00ff00);
    sprite.graphics.beginFill(0x0000FF);
    sprite.graphics.moveTo(0,0);
    sprite.graphics.lineTo(100,0);
    sprite.graphics.lineTo(100,100);
    sprite.graphics.lineTo(0,100);
    sprite.graphics.lineTo(0,0);
    sprite.graphics.endFill();
    var mc:Sprite=new Sprite();
    mc.addChild(sprite);
    //This will make the sprite to center
    mc.getChildAt(0).x=-(mc.getChildAt(0).width/2);
    mc.getChildAt(0).y=-(mc.getChildAt(0).height/2);
    addChild(mc);
    mc.x=200;
    mc.y=300;
    //Now it rotates from the center.
    mc.rotation=20;

  • 3D repousse objects and linking / rotation question

    In Photoshop CS5 Ext, I have 4 layers, each with a 3D repousse object on them. I want to somehow link them, so that I can rotate the object as a whole (or the camera), but also want to still be able to manipulate the objects separately (like rotate and position). Is there a way to do this in PS, or does this need to be done in another program like Flash? Tried unsuccessfully using merge 3D, linking, grouping...
    Thanks,
    John

    Thanks Steve for the reply and screenshot.
    I see that 3D panel will let me rotate, etc., but it doesn't look like I will be able to rotate objects separately using animation from the timeline, will it? That is another thing I forgot to mention that I want to do, is be able to animate (rotate and move) the objects separately.
    Thanks,
    John
    From: SG... <[email protected]>
    To: PSJK2011 <[email protected]>
    Sent: Sunday, September 25, 2011 9:37 PM
    Subject: 3D repousse objects and linking / rotation question
    Re: 3D repousse objects and linking / rotation question created by SG... in Photoshop Windows - View the full discussion
    Hi John,
    Merging 3D layers should be what you want. When you tried this what failed? If it was that you could only transform all of the objects instead of each separate object, then you'll need to make sure you are using the appropriate 3D tool. The UI needs some work to make this a bit easier to discover.
    There are 3D Mesh tools in the 3D panel that allow you to manipulate individual meshes, instead of the whole scene (3D Object tools).
    http://forums.adobe.com/servlet/JiveServlet/downloadImage/2-3937802-84277/176-600/3DMeshTo ll.png
    regards,
    steve
    Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/3937802#3937802
    To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/3937802#3937802. In the Actions box on the right, click the Stop Email Notifications link.
    Start a new discussion in Photoshop Windows by email or at Adobe Forums
    For more information about maintaining your forum email notifications please go to http://forums.adobe.com/message/2936746#2936746.

  • 3D shapes rotation axis

    Is there a way that I can automatically place the rotation axis on a 3D shape in the dead center of the shape (on the X,Y and Z axis) or do i have to just do it by hand?

    If the shape was drawn with the pen tool then you have to position the shape's anchor point by hand.
    If the shape was created with the Shape tools then you can reveal the transform shape properties and reset the position property to 0,0
    If the shape has a odd number of sides, like a triangle, this will not work properly so you will have to eyeball the shape center.
    I usually use the Transform properties for the shape for this instead of using the Layer Anchor point  because it is easier to be accurate with even sided shapes than using the layer's anchor point or the anchor point tool.

  • Help Combining Shapes Rotate

    Hello Everyone ...                                                                                                 Level: Newbie   OS: Win7 64bit   PS: Cs6
    I have made a Rectangle of which I have altered the shape
    Next and on the same layer I have selected the Ellipse tool and set it to Combine Shape
      then I have been creating small circles and placed them down the left and right side ~ I have placed the circles half on the Rectangle and half off
    however, when I go to Rotate the object(s) they are no longer Combined and will not Rotate together .... ??
    any ideas?
    Oh, also ... I am repeating the circles from top to bottom and I would like to keep them percisely in line but when I use Direct Selection tool to select the first circle made and then use Copy & Paste and then use the arrow keys to move the circle straight up ... are these Copied and Moved circles still in Combine Shape mode? Just Wondering because it doesn't seem like they are still combined.
    I've deselected by clicking the Move tool after making all the circles but that doesn't help either.
    Thank you

    When the shapes are all in one layer they will rotate as a unit unless you use the Path Selection Tool to select some path(s) and not others and then rotate.
    You don't have to copy and paste to duplicate paths in a Shape layer. You can Opt/Alt-drag with the Path Selection Tool to duplicate and move. Combine with Shift key to constrain to horizontal/vertical. The PST also has alignment and distribution options.
    Smart Guides (magenta lines) are a great aid to alignment but to use them you'll have to make separate Shape layers and then merge after they're aligned

  • Image degradation caused by rotation question

    When I rotate an image from a horizontal to vertical orientation using iPhoto8 on my 24" Intel-based iMac, the image is reduced in size and loses sharpness. Is this loss in sharpness because the monitor is no longer displaying the image at a correct pixel ratio or is it a software problem like the lack of a lossless rotation routine in iPhoto?
    Thanks, Rick

    I may be making some assumptions here but let me try and answer. Since the 24" iMac screen is almost twice as wide as it is tall, it stands to reason that when you rotate an image it will reduce in size. Or at least that will be the case if you were using a large portion of the wide screen to display the image horizontally in a landscape orientation. Anytime an image is reduced in size, it stands to reason that detail will suffer because fewer pixels are being used to render the image on the screen. Does that make sense or am I totally misunderstanding the question?

  • Simple shape fill question

    Ok ... i've been using photoshop since 1.0, and this has to be an elementary question - i'm just blanked.
    I drew a shape with the pen tool, closed it by clicking on the starting node.
    But the fill is "outside" the shape and not "inside".
    I've never seen this happen before  ...i've drawn literally thousands of shapes (tracing images etc as you would in illustrator or other vector-drawing programs).... what gives? how do i get the shape fill "inside" the shape and not "outside"?
    thanks.

  • WPA Key Rotation Question

    Hi All,
    In an AP, the broadcast-key change <value> command tells the AP how often to rotate the WPA key.  My question: How do clients remain connected to the Wireless LAN when the key rotates?  If the client authenticates (via Radius in my example below), then I would think the key challenge would need to be met. However, if in 5 minutes the key rotates, for example, isn't the client going to lose connection since the challenge value is now different?  The only thing I can think of is that Radius handles this dynamically once a client is authenticated, thus avoiding any disruption.  Is this correct?
    Here is my config, if interested:
    aaa new-model
    aaa group server radius employee-clients
    server 10.255.255.250 auth-port 1645 acct-port 1646
    aaa authentication login console local
    aaa authentication login net-admin local
    aaa authentication login eap_methods group employee-clients
    aaa authorization exec default local
    aaa session-id common
    dot11 ssid WLAN-Local
       vlan 20
       authentication open eap eap_methods
       authentication network-eap eap_methods
       authentication key-management wpa
    interface Dot11Radio0
    no ip address
    no ip route-cache
    encryption vlan 20 mode ciphers aes-ccm
    broadcast-key vlan 1 change 300
    radius-server host 10.255.255.250 auth-port 1645 acct-port 1646 key <key>

    All dot1x clients have a unique key but share a seperate broadcast key that is derived through the dot1x process. To rotate that key use this command ( broadcast-key vlan # change #) on the radio interface. . but the WPA cypher key which keeps on changing after some interval is to encrypt the data with different differnt keys so that it wil be difficult to be cracked/decrypt and not for reauthentication of clients.
    http://www.cisco.com/en/US/docs/routers/access/1800/1801/software/configuration/guide/wireless.pdf

  • Shape rotation using mouse

    Hi,
    I�m interested in rotating a shape by dragging the mouse.
    For example, visualise a rectangle, now imagine pressing the mouse on the top left-hand corner, then dragging that corner down, with the mouse, to rotate the shape. That�s what I want to do.
    Has anyone got any thoughts on this?
    Thanks,
    Luke

    it seems to rotate too much or some thing
    In the DragRotation class each rotation event is referenced to the original, non&#8211;rotated rect. When you redefine the shape each time then each rotation will have to be referenced to/from the last/current shape angular position. If it is already rotated and you rotate it with the current_rotated_angle plus the angle referenced to the original non&#8211;rotated rect you will get too much rotation. We have to change the way we reference the rotation.
    If I start walking from Los Angeles to Chicago and measure my distance from LA each time I arrive at a new town, okay. If I measure the distance from town to town it is a different way to reference the distance walked. If I leave Denver, at a distance of 1000 miles from LA, and walk to Omaha, a distance of 550 miles, I would have walked a total of 1000 + 550 miles. But if I get confused about the counting and add the total from LA to Omaha to the miles walked on the last leg (from Denver) it would appear that I walked 1000 + 550 + 550 miles. So we need to be clear about how we are measuring the distance traveled.
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.geom.*;
    import javax.swing.*;
    import javax.swing.event.MouseInputAdapter;
    public class DragRotation extends JPanel {
        Rectangle2D.Double rect = new Rectangle2D.Double(100,75,200,160);
        Shape shape = rect;
        protected void paintComponent(Graphics g) {
            super.paintComponent(g);
            Graphics2D g2 = (Graphics2D)g;
            g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
                                RenderingHints.VALUE_ANTIALIAS_ON);
            g2.setPaint(Color.blue);
            g2.draw(rect);
            g2.setPaint(Color.red);
            g2.draw(shape);
        public static void main(String[] args) {
            DragRotation test = new DragRotation();
            test.addMouseListener(test.rotator);
            test.addMouseMotionListener(test.rotator);
            JFrame f = new JFrame();
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            f.getContentPane().add(test);
            f.setSize(400,400);
            f.setLocation(200,200);
            f.setVisible(true);
        private MouseInputAdapter rotator  = new MouseInputAdapter() {
            AffineTransform at = new AffineTransform();
            Point2D.Double center = new Point2D.Double();
            double thetaStart = 0;
            boolean rotating = false;
            public void mousePressed(MouseEvent e) {
                Point p = e.getPoint();
                if(shape.contains(p)) {
                    Rectangle r = shape.getBounds();
                    center.x = r.getCenterX();
                    center.y = r.getCenterY();
                    double dy = p.y - center.y;
                    double dx = p.x - center.x;
                    thetaStart = Math.atan2(dy, dx);
                    rotating = true;
            public void mouseReleased(MouseEvent e) {
                rotating = false;
            public void mouseDragged(MouseEvent e) {
                if(rotating) {
                    double dy = e.getY() - center.y;
                    double dx = e.getX() - center.x;
                    double theta = Math.atan2(dy, dx);
                    at.setToRotation(theta - thetaStart, center.x, center.y);
                    shape = at.createTransformedShape(shape);
                    repaint();
                    // Counting in increments now.
                    thetaStart = theta;
    }

  • GC log rotation question

    Hi,
    So after JDK 1.6.0_34 (as far as I know), java introduced GC log rotation JVM args (see below)
    -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=1M
    Prior to these JVM arg additions, on any java application start, your GC log would get wiped. In my case a tomcat server running java code.
    So now I would assume when these JVM arg's are present, the GC log continues to rotate and not get wiped on application start up. However the above behavior still persists ever after JDK 1.6.0_34 with the new JVM args present.
    I should mention while the java application is running, the GC log DOES rotate (i.e., gc_log.txt.0, becomes gc_log.txt.1), but when application is restarted the LAST GC log is erased completely.
    This behavior isn't really "log rotation/backup", I've had to introduce my own shell/bat scripts to rotate the latest GC logs manually outside of these JVMargs. I'm not sure if I'm misunderstanding how to use the new JVM args or if oracle doesn't consider this a bug and this is normal behavior.
    I did file a bug on this, 9005051. However there is no guarantee your bug request ever makes it to the public bug database and oracle doesn't provide reasoning back to the submitter when the bug is rejected or not looked at, so I don't really know what happened with my bug request.
    If anyone has any insight into this, I would really appreciate it.
    Thank you!

    > Or better yet, where I can find someone to actually answer my question?
    Me! Me! I know the answer to that question...
    Oracle is more than happy for you to pay them for a support\service contract of which part of that will be that you can ask them questions and they will answer them.  Real Oracle engineers and perhaps the very people who created the code in the first place.  Or at least the ones in charge of it now.
    > yet there is no guarantee my bug is even a bug or will even get posted to the bug database
    Yes that is true.
    But I suspect, strongly, that if you have a big enough contract that every bug you post to the database, and that you tell oracle about, will appear promptly and be addressed promptly.
    And if you have a smaller (but not really small) Oracle contract I am rather certain that you can obtain a custom fix.
    Alternatively you can download the source, figure out the problem, and fix it yourself.  Then apply it to your running services.

  • Is this even possible? (Rotation question)

    Hi! I'm new to Java 3D... What I am trying to do is to rotate one transform group around another transform group. i.e. get a moon spinning the earth does anyone know how to do this? I am posting my code below.... I've searched the forums already and alas found no answer :( I've tried everything as you can see from the bottom of the code where all the "garbage" is. The actual earth has been commented out so that I can see the moon. Any help would be greatly appreiciated!! Thank you in advance! -JET
    import java.util.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.JFrame;
    import java.awt.GraphicsConfiguration;
    import javax.media.j3d.*;
    import javax.vecmath.*;
    import com.sun.j3d.utils.universe.*;
    import com.sun.j3d.utils.geometry.*;
    import com.sun.j3d.utils.image.TextureLoader;
    class System2 extends JFrame // implements ActionListener
         //a SimpleUniverse is used for this program
         System2() //constructor executes Program
              JFrame view = new JFrame("Program");
              view.setSize(800,600);
              GraphicsConfiguration config = SimpleUniverse.getPreferredConfiguration();
              Canvas3D c = new Canvas3D(config);
              Container cp = view.getContentPane();
              cp.add(c);
              SimpleUniverse u = new SimpleUniverse(c);          
              BranchGroup run = createSceneGraph();
              u.addBranchGraph(run);
              u.getViewingPlatform( ).setNominalViewingTransform( );
              view.setVisible(true);
         public BranchGroup createSceneGraph()
              //define Colors
              Color3f yellow = new Color3f(0.9f, 0.8f, 0.0f);
              Color3f bgColor = new Color3f(0.05f, 0.05f, 0.2f);
              Color3f white      = new Color3f(1.0f,1.0f,1.0f);     
              Color3f nullCol = new Color3f(0.0f,0.0f,0.0f);
              Color3f earthDiff = new Color3f(0.49f,0.34f,0);
              Color3f earthSpec = new Color3f(0.89f,0.79f,0);
              // Create a bounds for the background and lights
              BoundingSphere bounds = new BoundingSphere(new Point3d(0.0,0.0,0.0), 100.0);
              //create BranchGroup
              BranchGroup root = new BranchGroup();
              // Set up the background
              Background bg = new Background(bgColor);
              bg.setApplicationBounds(bounds);
              //root.addChild(bg);
              //add first TransformGroup
              TransformGroup earthTrans = new TransformGroup();
              Transform3D earth3d = new Transform3D();
              earthTrans.setTransform(earth3d);
              earthTrans.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);
              root.addChild(earthTrans);
              //Creating a Sphere for the Earth          
              //sets the appearance of the earth adds a texture image
              Appearance earthApp = new Appearance();
              earthApp.setColoringAttributes(new ColoringAttributes( yellow,ColoringAttributes.NICEST));
              PolygonAttributes polyAt=new PolygonAttributes(PolygonAttributes.POLYGON_FILL,
                                            PolygonAttributes.CULL_NONE,0f);
              earthApp.setPolygonAttributes(polyAt);
              Material earthMat = new Material(new Color3f(1f,1f,1f)
              ,new Color3f(0.25f,0.25f,0.25f)//Shadows color
              ,new Color3f(1.0f,1.0f,0.8f)//Sun's light
              ,new Color3f(1f,1f,1f)
              ,128);
              //earthMat.setAmbientColor(0,0,0.5f);
              //earthMat.setDiffuseColor(1,1,1);
              //earthMat.setShininess(1000);
              //Material(white,white,earthDiff,earthSpec,100f);
              earthMat.setLightingEnable(true);
              TextureLoader picload = new TextureLoader("earth.jpg",this);
              Texture earthpic = picload.getTexture();
              earthpic.setMagFilter(Texture.BASE_LEVEL_LINEAR | Texture.NICEST);
              earthpic.setMinFilter(Texture.BASE_LEVEL_LINEAR | Texture.NICEST);
              earthApp.setMaterial(earthMat);
              earthApp.setTexture(earthpic);
              TextureAttributes texAttr = new TextureAttributes();
              texAttr.setTextureMode(TextureAttributes.MODULATE);
              earthApp.setTextureAttributes(texAttr);
              //adding lights to the sphere
              System.out.println("directional lights");
              Vector3f direction = new Vector3f(-1.0f,-0.5f,0.1f);
              DirectionalLight dirLight = new DirectionalLight(true,white,direction);
              dirLight.setInfluencingBounds(bounds);
              root.addChild(dirLight);     
              //creates the earth
              Sphere earth = new Sphere(0.5f,Sphere.GENERATE_TEXTURE_COORDS | Sphere.GENERATE_NORMALS,100,earthApp);
              earthTrans.addChild(earth);
              System.out.println("doing rotation");     
              //Setting rotation of Earth
              Alpha rotEarth = new Alpha(-1, 10000);
              Transform3D yAxis = new Transform3D();
              //Setting the rotation in a clock wise direction (could have used default constructor)
              RotationInterpolator rotator = new RotationInterpolator(rotEarth, earthTrans, yAxis,
                        0.0f,(float) Math.PI*2.0f);
              rotator.setSchedulingBounds(bounds);          
              earthTrans.addChild(rotator);
              //end Earth
              //Start Moon
              TransformGroup moonTrans = new TransformGroup();
              Transform3D moon3d = new Transform3D();     
              moonTrans.setTransform(moon3d);
              moonTrans.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);
              root.addChild(moonTrans);
              Appearance moonApp = new Appearance();
              Material moonMat = new Material(new Color3f(1f,1f,1f)
              ,new Color3f(0.25f,0.25f,0.25f)//Shadows color
              ,new Color3f(1.0f,1.0f,0.8f)//Sun's light
              ,new Color3f(1f,1f,1f)
              ,128);
              moonApp.setMaterial(moonMat);
              moonApp.setColoringAttributes(new ColoringAttributes( white,ColoringAttributes.NICEST));
              Sphere moon = new Sphere(0.2f,Sphere.GENERATE_NORMALS,moonApp);
              moonTrans.addChild(moon);
              Alpha rotMoon = new Alpha(-1, 4000);
              yAxis = new Transform3D();
              //Setting the rotation in a clock wise direction (could have used default constructor)
              RotationInterpolator moonSpin = new RotationInterpolator(rotMoon, moonTrans, yAxis,
                        0.0f,(float) Math.PI*2.0f);
              moonSpin.setSchedulingBounds(bounds);
              Transform3D axisOfTranslation = new Transform3D();
              Alpha transAlpha = new Alpha(-1,
                        Alpha.INCREASING_ENABLE |
                        Alpha.DECREASING_ENABLE,
                        0, 0,
                        5000, 0, 0,
                        5000, 0, 0);
              axisOfTranslation.rotY(-Math.PI/2.0);
              PositionInterpolator translator =
                             new PositionInterpolator(transAlpha,
                             moonTrans,
                             axisOfTranslation,
                             2.0f, 3.5f);
              translator.setSchedulingBounds(bounds);
              moonTrans.addChild(translator);               
              moonTrans.addChild(moonSpin);
              root.compile();
              return root;
         public static void main (String [] args)
              System2 sys = new System2();
              TransformGroup moonTrans = new TransformGroup();
              Transform3D moon3d = new Transform3D();     
              moonTrans.setTransform(moon3d);
              moonTrans.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);
              root.addChild(moonTrans);
              TransformGroup sunTrans = new TransformGroup();
              Transform3D sun3d = new Transform3D();     
              sunTrans.setTransform(sun3d);
              sunTrans.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);
              root.addChild(sunTrans);
              //creates the Sun that is used for Directional lighting
              Appearance sunApp = new Appearance();
              sunApp.setColoringAttributes(new ColoringAttributes( yellow,ColoringAttributes.NICEST));
              Sphere sun = new Sphere(0.2f,sunApp);
              sunTrans.addChild(sun);
              //positions the sun
              Alpha posSun = new Alpha(-1,Alpha.INCREASING_ENABLE |
                        Alpha.DECREASING_ENABLE,
                        0, 0,
                        5000, 0, 0,
                        5000, 0, 0);
              PositionInterpolator sunPos = new PositionInterpolator(posSun, sunTrans);
              sunPos.setSchedulingBounds(bounds);
              sunTrans.addChild(sunPos);
              //root.addChild(aLgt);
              AmbientLight a = new AmbientLight(white);     
              a.setInfluencingBounds(bounds);
              root.addChild(a);
              System.out.println("point light");
              PointLight pl = new PointLight(true, white,new Point3f(1f,0f,1f),new Point3f(1.0f,0f,0f));
              pl.setInfluencingBounds(bounds);
              root.addChild(pl);
    Transform3D Trafo_1 = new Transform3D();
              Transform3D Trafo_2 = new Transform3D();
              Trafo_1.rotX(0.5);
              Trafo_2.rotY(0.5);
              Trafo_2.mul(Trafo_1);
              RotationInterpolator moonEarth = new RotationInterpolator(rotMoon, moonTrans, Trafo_2,
                        0.0f,(float) Math.PI*2.0f);
              //Billboard moonEarth = new Billboard(moonTrans, Billboard.ROTATE_ABOUT_POINT, new Point3f(0f,0f,0f));

    Yes it is possible. Build a scene graph where the TransformGroup of the moon is a child of the TransformGroup of the earth.
    TG1 __________ Earth Shape3D
    |
    |____ TG2 ___ Moon Shape3D
    In this way the overal transformation for the moon is the concatenation of TG2 and TG1. The transformation for the moon TG2 has to be given relative to the earth (i.e. the middle of the earth is the center of the local coordinate system for the moon).
    If you want the earth spinning then build the following graph:
    TG1___ TG3 ___ Earth
    |
    |____ TG2 ___ Moon
    Put the transformation of the earth position in TG1. Put the spinning transformation of the earth in TG3 and the position transformation of the moon relative to the earth in TG2. Thus the spinning of the earth will not interfere with the position of the moon.

  • Shape layer questions

    I’m a web designer that’s used to using Illustrator for all my work. Recently many of my new jobs want me to work in Photoshop, so I’m getting back up to speed with it. I have a  few nagging issues that I haven’t been able to figure out:
    With the direct selection tool, how do I select a small shape that’s overlapping a larger shape? For example, a small line on top of a large rectangle. When I try to do this Photoshop automatically makes me select the larger shape in the background. I have to zoom in super close and individually shift-select each corner of the smaller shape before I can move/transform/whatever it. This gets tedious and slow real fast!
    Recently in a document I’m working in, whenver I make a new shape it automatically adds a bunch of layer styles like drop shadow, stroke, etc. These styles aren’t turned on, but it adds unecessary styles to my layers and my client is very strict about recieving only super clean .psd’s.
    How do I make a line that is truly 1px stoke width? My lines seem to always start out as fuzzy 2px worms until I zoom in and surgically make them 1px. Again, what a waste of time! is there some sort of antialiasing setting that I need to turn off?
    Thanks!

    1. With smaller shapes that are difficult to select, try selecting their layer first. If you are not sure which layer, switch to the Move tool (V), hold Ctrl and click on the small shape. With the default behavior in Photoshop you should be able to select the layer and then use the Direct selection tool to select points on the vector path of the small shape. If you want to just move the entire shape when its the only path on a layer, aside form using the Path Selection tool (black arrow), you can just use the Move tool (V) to change the position of the layer. If you have to deal with a lot of shape layers that you just want to click and move, enable the Auto Select for the Move tool in the Properties bar. Then holding Ctrl while using the tool will toggle to its non - Auto Select mode.
    2.On the Tool's property bar under the main menu, make sure the chain button is not pressed then click on the Style swatch or arrow to the right of the chain button to open the style swatch popup and from its menu there choose No Style. Next shape layer you make will not have the current style automatically applied. 
    3. I'm using CS5 on a pc and creating 1 px straight line with the Line tool is buggy with its alignment to grid. The Line Tool draws lines in Shape mode as rectangle vector paths. The difference between the Rectangle Tool and the Line tool is that the Line tool aside from having a Weight attribute, it draws the rectangles starting from the middle if its side. In order to snap it to grid you have to set the grid in the settings to Gridline every 1 pix and Subdivisions 2. If properly working this is supposed to solve your problem if you enable snap to grid and draw your lines starting in the middle of a pixel. The problem is that this doesn't work properly with the Line Tool which does not snap perfectly to the grid. The work around is to draw your lines with the Line Tool in Fill Pixels mode which has an Anti-aliasing option that you can turn off.
    Another alternative for drawing lines on raster layers without anti-aliasing is to use the Pencil tool and hold Shift while dragging with it. The Pencil Tool in Photoshop is the same as the Brush tool but without anti-aliasing. I think more proper name would be non - anti-alised brush.

  • Ad rotator question

    I need to add a class to the image tag in the ad rotator, is this possible?
    If so how/where?

    Hi,
    the main objective to install a domain controller in each site is to avoid the authetification  through a domain controller in another site, to reduce VPN connection and ensure the availability  of domain in each site in case of VPN connection
    is down.
    So it's recommanded to configure your sites and subnet to let computers contact the local DC for performance reason.
    To ensure that all computer and servers ask the local domain controller, you must add their subnet  in site which contain the local domain controller through the sites and services wizard.
    if the local DC will not be available ,client will try to contact another available DC, not with the same performance because it will use VPN connection, to avoid this situation , you can install another DC in the same site.
    For DNS , just put the local DNS as primary one, and choose a DNS fom another site as secondary , with this configuration Client will able to detect all domain object, and DNS record (with all Subnet network).
    If your sites is not totally you can configure bridge site manually to get more information please check theses links below:
    AD Site Design and Auto Site Link Bridging, or Bridge All Site Links
     Active Directory Sites and Services
    Understanding Sites, Subnets, and Site Links

  • IOS 6 auto rotation question?

    I updated the software for my 3GS to IOS 6.  However, I noticed when viewing my Facebook page, the screen doesn't not auto rotate from portrait to landscape.  Is this by design or is there a glitch? 

    STEP 1
    Press the "Home" button below the iPhone screen twice to display the icons for recently used apps in the bottom status bar.
    STEP 2
    Swipe the status bar from left to right until you see the screen lock icon, which is a padlock inside a circular arrow.
    STEP 3
    Tap the screen lock icon to turn off the screen lock. The padlock icon will disappear and screen rotation should unlock.
    STEP 4
    Press the "Home" button again to return to hide the status bar.
    STEP 5
    Launch an app that you know allows screen rotation, such as the "Calculator" app.
    STEP 6
    Rotate the iPhone to ensure that the Calculator screen also rotates. If the screen moves as expected, you have successfully removed the lock. If the screen remains locked, press and hold down the "On/Off" button and then swipe the "Slide to Power Off" tab to switch off the iPhone. Press the "On/Off" button to power on the iPhone.

  • Rotation Question

    i am making a simple picture racing game and i want to know what is the best way to make wheels spin when you go with no blinks and smooth animation, i am using JPanel. will it be better to make program rotate image itself or make different images myself. if making program rotate it itself is the better way what is the best way to do it, thx for reading.

    import java.awt.*;
    import java.awt.event.*;
    import java.awt.geom.*;
    import java.awt.image.BufferedImage;
    import javax.swing.*;
    public class SpinTest extends JPanel
        BufferedImage wheel;
        int theta;
        public SpinTest(BufferedImage image)
            wheel = image;
            theta = 0;
        protected void paintComponent(Graphics g)
            super.paintComponent(g);
            Graphics2D g2 = (Graphics2D)g;
            g2.setRenderingHint(RenderingHints.KEY_INTERPOLATION,
                                RenderingHints.VALUE_INTERPOLATION_BICUBIC);
            double x = getWidth()/4;
            double y = getHeight()*2/3;
            AffineTransform at = AffineTransform.getTranslateInstance(x,y);
            at.rotate(Math.toRadians(theta), wheel.getWidth()/2, wheel.getHeight()/2);
            g2.drawRenderedImage(wheel, at);
            x = getWidth()*7/12;
            y = getHeight()/6;
            at.setToTranslation(x,y);
            at.scale(1.4, 1.4);
            at.rotate(Math.toRadians(theta), wheel.getWidth()/2, wheel.getHeight()/2);
            g2.drawRenderedImage(wheel, at);
        public void advance()
            theta = theta+3 < 360 ? theta+3 : 0;
            repaint();
        public static void main(String[] args)
            SpinTest spinTest = new SpinTest(createImage());
            Spinner spinner = new Spinner(spinTest);
            spinTest.addMouseListener(spinner);
            JFrame f = new JFrame();
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            f.getContentPane().add(spinTest);
            f.setSize(400,400);
            f.setLocation(200,200);
            f.setVisible(true);
        private static BufferedImage createImage()
            int d = 74;
            double rimThickness = 16;
            double outerRim = d;
            double innerRim = outerRim-rimThickness;
            double hubDia = 24;
            BufferedImage bi = new BufferedImage(d, d, BufferedImage.TYPE_INT_ARGB);
            Graphics2D g2 = bi.createGraphics();
            g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
                                RenderingHints.VALUE_ANTIALIAS_ON);
            g2.setPaint(new Color(0,0,0,0));
            g2.fillRect(0,0,d,d);
            // spokes
            g2.setPaint(Color.red);
            double r = (d/2) - rimThickness/2;
            for(double theta = 0.0; theta < 2*Math.PI; theta+=Math.PI/6)
                double x1 = d/2 + r * Math.cos(theta);
                double y1 = d/2 + r * Math.sin(theta);
                g2.draw(new Line2D.Double(d/2, d/2, x1, y1));
            // hub and rim
            double x = (d - hubDia)/2;
            Ellipse2D hub = new Ellipse2D.Double(x, x, hubDia, hubDia);
            g2.setPaint(new Color(140,0,0));
            g2.fill(hub);
            Ellipse2D outer = new Ellipse2D.Double(0, 0, outerRim, outerRim);
            x = (d - innerRim)/2;
            Ellipse2D inner = new Ellipse2D.Double(x, x, innerRim, innerRim);
            Area rim = new Area(outer);
            rim.subtract(new Area(inner));
            g2.fill(rim);
            g2.dispose();
            return bi;
    class Spinner extends MouseAdapter implements Runnable
        SpinTest spinTest;
        Thread thread;
        boolean running;
        final int DELAY = 40;
        public Spinner(SpinTest st)
            spinTest = st;
            running = false;
        public void run()
            while(running)
                try
                    Thread.sleep(DELAY);
                catch(InterruptedException ie)
                    System.err.println("interrupt: " + ie.getMessage());
                spinTest.advance();
        private void start()
            running = true;
            thread = new Thread(this);
            thread.setPriority(Thread.NORM_PRIORITY);
            thread.start();
        private void stop()
            running = false;
            thread = null;
        public void mousePressed(MouseEvent e)
            if(!running)
                start();
            else
                stop();
    }

Maybe you are looking for

  • Stock report for cross-company sales

    Dear all, We are using for our Saudi Arabia company the cross-company sales process with sourcing unit in another country. There is a Legal requirement in Saudi to provide a Stock report (with "stock in", "stock out" quantities and values). But with

  • Display distoring when scrolling + flickering in video.

    At random times my display starts distorting (seems that there isn't a full screen refresh taking place when it should) when I scroll in Safari, Firefox, Cyberduck etc. Video also distorts at these times. See a picture here: http://www.rutgermuller.n

  • Can't log onto Netgear network

    Can someone please please help, cannot join my exsiting netgear network, I have a dual G4 1ghz desktop, that is on there with no problem through it's wireless extreme card, I also have a G4 1ghz apple laptop, that also can join with no problem, this

  • Photoshop CC and CC 2014 Leaves Hairlines Around Frame Edges

    If you erase a background from a product shot, then put that product shot on another canvas you can see the square outline of the original photograph. New versions of Photoshop are leaving a one pixel or maybe half a pixel border around the outside e

  • IPhoto 6 won't open

    I have been using iPhoto 6 since it came out without problems. Yesterday, to solve unrelated problems, I was forced to do a full restore which included photos that were "pre-iPhoto 6". Therefore I had to re-install iPhoto 6. Now iPhoto 6 will not run