Draw figure without stroke?

I want to draw a shape (rectangle) without any stroke. I tried creating a BasicStroke with zero width, but this did not work. The reason was confirmed in this passage from the docs:
"If width is set to 0.0f, the stroke is rendered as the thinnest possible line for the target device and the antialias hint setting."
So a line is still drawn on my screen.
For now I will just draw the stroke in the same color as the fill so it will not show, but would like to have a better solution.
Thanks,
Steve C.

Try this....
    graphics.setColor(Color.red);
    graphics.fill(rectangle);Thats all I do... use the graphics.draw(rectangle) if you want the stroke

Similar Messages

  • Subject: Displaying key figures without currency unit in BEX reports

    Hello,
    Is it possible to display key figures without currency unit in BEx reports? For example; Material Costs 1000 EUR
    should be shown as 1000. Currency unit EUR and also scaling factor (*1000 EUR) does not interest us.
    When we use display options in query properties, we just see an option of displaying key figures with/without scaling factors, which does not solve our problem.
    Thanks for your reply.
    Regards,
    Nuran Adal

    Hi Eugene,
    thank you very much for your quick reply. We have very detailed reports with min. 10 columns, I should have defined 10 more formula columns to realize this (NODIM), but anyway there is no other way to do this, am I right?
    Best Regards,
    Nuran

  • Creating a shape outline without stroke

    I'm creating navigational elements in photoshop and I want to be able to adjust the outline by itself, as well as there are some elements that are only an outline with no fill. How do I create shape outlines without the fill?
    Adobe Photoshop CS4, PC.

    they changed this a few times, on one version there was a stroke style option to do it.
    the earlier versions there was a long winded way of
    1. Draw your rounded rect etc with the tool
    2. Ctrl-select that layer to select the shape
    3. Create a new layer
    4. Edit -> Stroke... to create the outline
    5. Delete the original shape
    another was was Select->Modify->Border
    don't forget there is a stroke from the drop down menus not just in effects, this is what you need when you want a stroke on a stroke on a stroke etc

  • Drawing tables without boxes and lines in XI

    Post Author: geeeeee
    CA Forum: Crystal Reports
    Hi I'm trying to figure a way to draw tables in XI (it seems like a pretty simple task) but I can't find how to draw a table without hand drawing lines and boxes. Any ideas? Thanks

    Hi,
    Unfortunatelly drawing a frame for table is not so straightforward. To draw a frame around the columns and table itself you need to create a window (on top of window where you display your table) placing it at column position and checking Lines width in Output Options tab for this window. This will produce a fake column frame. See [this example|http://img294.imageshack.us/my.php?image=tableq.png].
    For rows you could do similar: check what is the heihgt of row in the table and draw respective windows as rows. This one, however will look a bit strange, but for columns it looks and works fine.
    Regards
    Marcin

  • Draw figures from a xml and then draw anothers when I click on them

    This is what I have to do:
    I got a XML file with the info of a drawing: circles, rectangles.....
    I read the file and I draw the figures on a JPanel.
    And now what I have to do is this:
    When I click on a figure I have to recognize what figure is, for example, rectangle number 2 on the XML file. Then I have to read the XML and foud what I have to draw when I click on that figure, this info is on the XML:
    <Transition Rectangle="2" NextDraw="Rectangle 3" />
    How do I draw all these figures and keep the info I need (name and number of the figure)? And how do I manage mouse events for recognize the click on a figure for draw anothers.
    Sorry for my bad english and thanks

    I don't know the structure of your XML file.
    Anyway, I guess it's something like the following :
    shapes.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <shapes>
         <Transition Rectangle="1" NextDraw="Rectangle 2" />
         <Transition Rectangle="2" NextDraw="Rectangle 3" />
         <Transition Rectangle="3" NextDraw="Circle 1" />
         <Transition Circle="1" NextDraw="Circle 2" />
         <Transition Circle="2" NextDraw="Circle 3" />
         <Transition Circle="3" />
    </shapes>Here the java code. Plz, take a look at it and adapt it to your needs.
    XMLParserHandler.java
    import java.util.HashMap;
    import java.util.Map;
    import org.xml.sax.Attributes;
    import org.xml.sax.SAXException;
    import org.xml.sax.SAXParseException;
    import org.xml.sax.helpers.DefaultHandler;
    public class XMLParserHandler extends DefaultHandler {
         Map<String, String> shapes;
         public XMLParserHandler(){
              shapes = new HashMap<String, String>();
         public void startDocument() throws SAXException {
              //System.out.println("Start Shapes Document.xml");
              shapes = new HashMap<String, String>();
         public void endDocument() throws SAXException {
              //System.out.println("End Shapes shapes.xml");
         public void startElement(String uri, String localName, String qName,
                   Attributes attributes) throws SAXException {
              //System.out.println("Start Element : " + qName);
              //display(attributes);
              if("TRANSITION".equals(qName.toUpperCase())){
                   String key = null;
                   String value = "";
                   int n = attributes.getLength();
                   String attrName;
                   for (int i = 0; i < n; i++) {
                        attrName = attributes.getQName(i);
                        if(! "NEXTDRAW".equals(attrName.toUpperCase())){
                             key = new String(attrName+" "+attributes.getValue(i));
                        }else{
                             value = new String(attributes.getValue(i));
                   if(key!=null){
                        shapes.put(key.toUpperCase(), value.toUpperCase());
         public void endElement(String uri, String localName, String qName)
                   throws SAXException {
              //System.out.println("End Element : " + qName);
         public void characters(char[] ch, int start, int length)
                   throws SAXException {
              //System.out.println(new String(ch, start, length));
         public void error(SAXParseException e) throws SAXException {
              throw e;
         public void fatalError(SAXParseException e) throws SAXException {
              throw e;
         public Map<String, String> getShapes() {
              return shapes;
         private void display(Attributes attrs){
              int n = attrs.getLength();
              for (int i = 0; i < n; i++) {
                   System.out.println("***"+attrs.getQName(i)+" = "+attrs.getValue(i));
    MyPanel.java
    import java.awt.Color;
    import java.awt.Graphics;
    import java.awt.Graphics2D;
    import java.awt.Shape;
    import java.awt.event.MouseAdapter;
    import java.awt.event.MouseEvent;
    import java.awt.geom.Ellipse2D;
    import java.awt.geom.Rectangle2D;
    import java.util.ArrayList;
    import java.util.List;
    import java.util.Map;
    import javax.swing.JPanel;
    public class MyPanel extends JPanel {
         static String CIRCLE = "CIRCLE";
         static String RECTANGLE = "RECTANGLE";
         public List shapeList;
         int currentIndex = 0;
         Shape currentShape;
         public MyPanel(Map shapes, String entry) {
              createShapeList(shapes, entry);
              addMouseListener(new MyMouseListener());
         private String getShapeName(String value){
              return value.split("\\s+")[0];
         private void createShapeList(Map shapes, String entry){
              shapeList = new ArrayList();
              Shape shape=null;
              String key = new String(entry);
              String value ;
              int i=0;
              do{
                   value=getShapeName(key);
                   System.out.println(value);
                   if(CIRCLE.equals(value)){
                        shape = new Ellipse2D.Double(5, 5+40*i, 20, 20);
                        System.out.println("==> added circle");
                   }else if(RECTANGLE.equals(value)){
                        shape = new Rectangle2D.Double(5, 5+40*i, 20, 20);
                        System.out.println("==> added rectangle");
                   shapeList.add(shape);
                   key = (String)shapes.get(key);
                   i++;
              }while(value!=null&&value.trim().length()>0);
              currentShape = (Shape)shapeList.get(currentIndex);
         class MyMouseListener extends MouseAdapter{
              public void mouseClicked(MouseEvent e) {
                   int x = e.getX();
                   int y = e.getY();
                   if(currentShape.contains(x, y)){
                        if(currentIndex<shapeList.size()-1){
                             currentIndex++;
                             currentShape = (Shape)shapeList.get(currentIndex);
                             repaint();
         public void paint(Graphics g) {
              Graphics2D g2 = (Graphics2D) g;
              g2.setPaint(Color.red);
              for (int i = 0; i < currentIndex+1; i++) {
                   g2.fill((Shape)shapeList.get(i));
    Main.java
    import java.io.File;
    import java.util.Map;
    import javax.swing.JFrame;
    import javax.xml.parsers.SAXParser;
    import javax.xml.parsers.SAXParserFactory;
    public class Main {
         public static void main(String[] args) {
              SAXParserFactory spf = SAXParserFactory.newInstance();
              SAXParser parser;
              Map myShapes = null;
              try {
                   parser = spf.newSAXParser();
                   XMLParserHandler handler = new XMLParserHandler();
                   parser.parse(new File("shapes.xml"), handler);
                   myShapes = handler.getShapes();
                   String entry = "RECTANGLE 1";
                   //Create and set up the window.
                   JFrame frame = new JFrame("MyFrame");
                   frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                   // Create and set up the content pane.
                   MyPanel newContentPane = new MyPanel(myShapes, entry);
                   newContentPane.setOpaque(true); // content panes must be opaque
                   frame.setContentPane(newContentPane);
                   // Display the window.
                   frame.setSize(400, 400);
                   frame.setResizable(false);
                   frame.setVisible(true);
              }catch(Exception e){
                   e.printStackTrace();
    NB: as mentioned in the Main class (see main method), you should provide the main entry for your xml file : String entry = "RECTANGLE 1";Hope That Helps

  • Drawing Markups Without Pop-up Note

    How can I use drawing markup tools in Acrobat Professional without having a pop-up note. I don't meant that I just want the pop-up note to stay closed unless I open it intentionally, I don't want a pop-up note at all, just the markups.
    Thanks

    You can hide annotations, but you don't have direct access to this property in Reader. You can use the Filter options in the Comments List to do it, but I don't think it will "stick", ie the next time you open the file they'll be visible once more.
    With Acrobat you can embed a script in the file that will automatically hide some annotations when the file is opened.

  • Can't practice drawing, erasing without threatening underlying template

    I'm using Win 7 and AI cs5 and I'm practicing a bit of sketching.
    I've pasted in a nearly transparent outline of a child's head from PS.  I was hoping to use it as a template of sorts, creating hair styles on top of the template, etc. -- then erasing those, and trying new styles.  Each time I try to select the tryout hair paths for erasure I also am selecting the underlying template.  How can I keep that template secure from erasure?
    I've tried putting the template on separate layer, then locking that layer but then I'm prevented from drawing paths over its object.  I've tried locking that template as an object -- same thing, I can't draw lines on top.
    What am I missing?
    GM

    I finally got it.  I moved the locked layer, the one with the base drawing I didn't want disturbed, selected, drawn to -- to below the other layers.  Now I can be on other layers, draw over the locked one, erase my practice strokes at will with no threat to the base drawing.
    GM

  • Permanently showing paths without stroke or fill

    Hi
    Returning to Illustrator after not using for a long time.
    How can I permanently show paths created for example by the pen tool when I create them with no fill or stroke attributes - for example a set of contours?
    If I set the view to outline (control + Y it does this but puts them on a white background meaning I can't see underlying layers.
    What am I doing wrong?
    Thanks

    You can set layers to outline mode individually.
    Hold the Command (Mac) or CTRL (Win) key and click the visibility eyeball icon next to the layer name in the Layers Panel.

  • Drawing with a custom profile stroke is not working for me. Does it work for you?

    Drawing with a custom profile stroke is not working for me. Does it work for you?
    I can only apply it on an existing stroke but can't draw a new one with the selected profile. In fact if I change the profile to other than the default Uniform I also can't draw a new stroke with any other width than the default 1 point. This doesn't seem normal.
    Using SC5 on a PC.

    Another question on the same topic.
    Once I add a new profile to the list is it possible to put it on top of the list. I need this because the Adobe people decided to put the list in a tiny scrollable window with only a few of the first profiles showing. If there is noting in the interface may be I have to modify some program files settings?

  • CS 5.5 Create Outlines text messes with stroke

    I am running CS 5.5 and I need to be able to turn all my text into outlines.  Now, before I get slammed for doing this, I send most of my material over seas and converting the text to outlines is pretty much a requirement.
    My issue is that when I do "Create Outlines" in InDesign, it automatically reduces the stroke width of all my text. Also, if I have it set to stroke to the outside of the text, it defaults to center.  If I try to change the converted text back to outside stroke it goes all crazy, not giving me a uniform stroke.
    Is there a fix for this or a different way for me to convert my text and have the stroke attributes left alone?

    You are stuck.
    I, too, am sometimes forced by my clients to convert all text to outlines. We're a translation provider, so my clients often want to be able to open up their InDesign files to adjust graphics without any fear of dropped fonts or human error damaging their translations. I don't know why you need to apply a stroke to text (are you faking bold?) but you can't include reliance on applying strokes to text in any workflow that relies on having all text converted to curves/outlines at the end of the project.
    I've seen some workarounds of varying degrees of quality that worked okay in unique circumstances, but nothing that is a one-shot solution.
    The link you posted - there is at least one thread on these forums about that link & how about that technique no longer works in CS5 or CS5.5, I can't recall exactly. I do remember that a particularly helpful & knowledgable Adobe employee pointed out that the fact that this method worked to convert all text to outlines was basically a workaround or hack - that what you were realy doing was flattening transparency, which converted type to outlines as a side-effect. So it would be useless to you in any event if you must retain layers in your PDF.
    If you are, as I suspect, adding stroke to fake a boldface that you don't have (or that doesn't exist), try another technique - perhaps you can use a font editor to actually generate a font with the effect you're trying to get with the stroke. If you're using stroke as a visual effect, then you may be able to dupe & stack - set your stroked phrase without stroke, create outlines, duplicate, and then add stroke, then place it behind the first outlined word in the stacking order, then manually (using the direct select tool) play with the curves until it looks okay.
    As I said before, I've seen a variety of workarounds, and if you can post a sample of what you are trying to do then perhaps I or one of the other forums readers can figure out a trick to suggest to you.

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

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

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

  • Adobe photoshop cs5 stroke problems

    Dear Adobe Team,
    We are using adobe Photoshop CS5 in our HP Workstation machine, but since we changed our OS in windows 7 we are facing stroke problems.
    Like whenever we draw a straight stroke than it does not go straight it becomes curve type. Please find the below attached image of stroke.
    We are using cintiq Pen display & HP z420 workstation.
    So requesting you to kindly provide the solution ASAP

    Well, works perfectly here... (PSElements 6 “Mac”)...
    Select your image or specify an area...
    Go to Filter / Render / Lighting Effect.../ and specify your desired options...
    If that doesn’t work, delete the preference file...
    If that doesn’t work either, you might have to reinstall PS Elements...
    Regards
    Nolan

  • Adding new key figures to DP planning area

    I am using APO DP.
    When adding new key figures to a planning area, is there any way of avoiding having to deinitialise and then re initialise the planning area?
    Thanks for any advice on this...

    First of, let us know which version of DP are you using.
    If you are using 7.0, all you need to do is right click on your planning area and select Change Keyfigure setting and you should be able to update the key figures there.
    The below is from SAP help for SAP APO 7.0, you should be able to add the key figure without deinitializing the planning area.
    Key Figure Settings
    Here you can change the properties of the key figures of a planning area, if the planning area has already been initialized. You can also add or delete key figures. However, you can only delete key figures that are no longer used in planning books, data views, macros, or demand forecasts. You can find out in which objects a specific key figure is used with the where-used list.

  • How can I set up a List of Figures with extra text?

    I'm writing my Art History dissertation, which includes a substantial group of figures at the end.  My advisor has requested that I caption the images, but also provide a List of Figures before the actual images begin.  I've got it figured out this far--I'm using the Table of Contents feature to automatically number the captions and then pull the caption text back to the List of Figures. 
    Here's the snag:  I need to include attribution information about where I found the images I'm using, but only in the list of figures.  My advisor specifically requested that I not include this information in the captions as he felt it cluttered the images.  How can I include small amounts of text (for example "After Jones 1987, Fig. 22") for hundreds of images in the List of Figures without putting this info in the captions themselves? 
    Of course, just typing the info into the List of Figures doesn't work--as soon as the list is updated the extra text gets erased.  I've been playing around with hidden layers, but when I create a new hidden layer with text frames the numbering of the original layer is disturbed.  Any ideas about how to preserve the numbering and include the extra information in the List of Figures without adding it to the visible caption? I'd be very grateful for any help.

    Perhaps at the end of your caption, in a [None] coloured text, 0.1 pt size? Don't put it into a separate paragraph, 'cause you'd need to pick this up as well for your TOC. To edit this invisibly small text, you can use the Story Editor.
    (And I got quite far suggesting making it Conditional Text, which you would normally hide, having it show only when you generated the List of Figures, before a few dormant neurons woke up and demanded attention.
    'Course it would work -- you would get the extra text in your list, and if you hide the conditional text again, your document would reverse to "normal" state. However, making the conditional text visible may cause your text to reflow, and thus your regular Contents would be okay but the List of Figures -- generated with more text in your document! -- could well be off by a few pages ...)

  • Crystal reports on SAP-BW 3.5 query - problem w. properties of key figures

    Dear experts,
    Creating a crystal report on a SAP-BW 3.5 query we have the following problem:
    In SAP-BW query we defined a restricted key figure with property
    'Calculate single value as Ranked list (olympic)'.
    Within SAP-BW it works correctly; in Crystal Reports we see the
    key figure without the defined property.
    Example
    SAP-BW
    Customer     Revenue 
    4711            1
    4812            2
    4913            3
    Crystal Reprts
    Customer     Revenue 
    4711            500 EUR
    4812            300 EUR
    4913            100 EUR
    Could anyone give us an advice to solve this?
    Thanks a lot in advance.
    Hagen

    Edited by: Hagen Kunze on Feb 12, 2010 3:22 PM

Maybe you are looking for

  • Very odd HDD issues on X38 Plat.

    Hey Guys, I just upgraded to an X38 Platinum, specs: XP Prof. 32bit X38 Platinum, BIOS 1.1 Q6600 Core2 Quad, 2.4ghz stock : CoolIT Eliminator Aenon DDR3 2GB VisionTek 3870 X-Fi XtremeMusic PC Power & Cooling 750 Silencer Quad (Single rail 12v design)

  • Dual-head on NVIDIA

    Hello, I'm trying to configure a dual-head setup (NVIDIA proprietary drivers). I've tried both Xinerama and Twinview, but the screen is always treated as one big virtual screen and window managers spread fullscreen windows over both monitors. Here's

  • How To Get Album Art  for my Songs?

    Is there anyway that I can get album art for my songs, I tried the Get Albums from Itunes, but I need an account with a credit card, I have no way of getting that. is there any other ways I can get album pictures other than Doing it manually?

  • Deploying iPads with iPhone Configuration Utility

    We are trying to deploy some iPad2s into an enterprise environment. I have been able to push some settings like WiFi or remove Safari via iPhone Configuration Utility. However, we are needing to have one app installed (Prezi) from the App Store. I ca

  • Aperture applying unwanted adjustments when loading an image

    Hello, I'm having a bit of an issue with Aperture and I'm wondering if the community can help me. My camera is a Canon Eos 600D. I'm running Aperture 3.4.3 on a Mid 2010 iMac 27", with 8GB of Ram. Just lately, when I import and load images into Apert