I want to draw rounded rectangle with dashed border

Hello,
I am working on flex 4.5 air 2.7 . And i want to draw rounded rectangle which has dashed border or solid border as per user's selection. Also rectangle can be rounded or simple. I am able to draw simple rectangle with dashed border. I want a solution for rounded rectangle.
If anyone have any idea then post as soon as possible..
Thanks
Dhwani

Good day!
Could you please post a screenshot with the Layers Panel visible?
Is the iten by any chance a Shape Layer and therefore does have a Vector Mask?
Regards,
Pfaffenbichler

Similar Messages

  • Spark - Drawing a rounded rectangle with 3-sided border?

    I am upgrading to the Spark theme, and I am trying to draw a rectangle, with a corner radius of 20, with a border on only the top, right, and bottom sides.
    Basically, I want it to dock flush left in my application and extend out in a rounded rectangle.
    But I Cannot figure out how I would draw this in SVG? Anyone done this yet?

    Ned,
    Thank you for your response.  I apologize for the delay in my own response.
    I was seeing distortion in x direction as well.
    I was able to solve my problem using 9-slice scaling.  I used the scale9Grid property.

  • Want to draw some rectangles inside a swing panel object

    HI,
    I want to draw some rectangles inside one JPanel object in swing. The JPanel object should also hold some buttons, labels, etc.. I can add simple buttons, label etc. easily to the panel object but how do I add graphics (like lines, rectangles) to it ??
    an immediate response would be highly appreciated!!

    I am not sure why you are talking about the rectangle.
    To repeat I fill in a bit of code (subject to compiler errors since I Do not have a machine where I can compile or test on at the moment):
      private class ColourCube extends JPanel 
         // The size of each rectangle with colour
         private static final int ROWS = 10;
         private static final int COLS = 10;
         // To store current selection
         private int selectedIndex[] = null;
         public ColourCube()
             addMouseListener( new MouseAdapter() {
                public void mouseReleased(MouseEvent me)
                   // Find the rectangle index by dividing
                   // x and y positions then set selectedIndex
                   // unless it is the same positions as previous
                   // then set it to be null
                   fireActionEvent();
         // needed listener methods for firing events
         public void addActionListener( ActionListener al)
            // add to list
         // remove etc....
         protected void fireActionEvent()
            // Construct action event
            // call actionPerformed( ae ) on all listeners
         public void paintComponent(Graphics g)
             // Depending on size and height of this component
             // calculate out colWidth and rowHeight
             // Loop and paint the rectangles in their different colours
             for(int i = 0; i < ROWS; i++)
                for(int j = 0; j < COLS; j++)
                   // set the colour to the graphics object here from the list of colours available
                   g.setColor( ... );
                   // Added a little bit extra to have some space between
                   // each rectangle
                   g.fillRect( i * rowHeight + 1, j * colWidth + 1, colWidth - 2, rowHeight - 2 );
             if( selectedIndex != null )
                // We have a selection, lets paint the selection
                g.setColor( Color.white ); // Selection colour
                // The index contains the row in index 0 and the col in index 1
                g.drawRect( selectedIndex[0] * rowHeight, selectedIndex[1] * colWidth, colWidth, rowHeight );
      }Lacking from the above component is lacking stuff like preferedSize.
    Now, all you do is instantiate the ColourChooser, add it to your applet iether by drag and drop if you have an WYSIWYG editor, or by hand if you are so inclined.
    Voila! A composite component appears, doing the stuff it needs to be doing.
    Regards,
    Peter Norell

  • Fill a rounded rectangle with a gradient paint with "new RoundRectangle2D"?

    Hello,
    at the moment I have to do a lot of Java2D to draw a customized GUI. Now it comes to a simple task, filling a rounded rectangle with a gradient paint. I have a solution for this - but I don't know if it is bad to do it this way:
    private void drawBackground( Component component, Graphics2D graphics2d ) {
         int w = component.getWidth() - 1;
         int h = component.getHeight() - 1;
         graphics2d.setPaint( gradientPaint );
         RoundRectangle2D backgroundShape =
              new RoundRectangle2D.Float( 0, 0, w, h, 10, 10 );
         graphics2d.fill( backgroundShape );
    }This is very easy and it works. The backdraw is, that on every call of "drawBackground", which is called on a repaint() method by Swing, a "new RoundRectangle2D.Float" will be created. I don't know how "expensive" it is to create a new RoundRectangle2D. On the other hand, I don't know how to fill a rounded rectangle with a gradient paint without a RoundRectangle2D.
    When I do it this way, I worry that at a later time, when I created a lot of custom components that all create shapes on a repaint, the GUI may become horrible slow or has a huge memory footprint.
    Well, I would like to hear some kind of "this is okay" (maybe because those Shape implementation are all not very memory consuming and the instanciation in Java is not very time consuming) by you Java2D experts :) Or, of course, how I could do it better.
    Thanks a lot for your help!

    patb1 wrote:
    on every call of "drawBackground", which is called on a repaint() method by Swing, a "new RoundRectangle2D.Float" will be created. I don't know how "expensive" it is to create a new RoundRectangle2D.
    When I do it this way, I worry that at a later time, when I created a lot of custom components that all create shapes on a repaint, the GUI may become horrible slow or has a huge memory footprint.You could do as many UI delegates in the Swing code do with Rectangles: maintain a RoundRectangle2D as a field and set its attributes when it is to be painted (setRoundRect(double x, double y, double w, double h, double arcw, double arch)).
    db

  • Draw Rectangle with red border and transparent center

    I need a little help on the rectangle object.  I need to draw a rectangle with a transparent middle and a red boarder with a thickness of 2:
    Code:
    private void InitializeRectangle(Rectangle rectangle, CellLayoutBox cellBox)
    rectangle.Fill = new SolidColorBrush(Colors.Transparent);
    rectangle.StrokeThickness = 1;
    rectangle.Width = cellBox.Width;
    rectangle.Height = cellBox.Height;
    Canvas.SetLeft(rectangle, cellBox.Left);
    Canvas.SetRight(rectangle, cellBox.Top);
    I know I am missing the mark here, but it I can't seem to get a rectangle with a transparent fill and stroke of a different color even if I change the Colors.Transparent to another color. Any help is appreciated.

    @katghoti,
    Thanks for sharing the result back to forum.
    Best regards,
    Barry
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How can we draw Round Rectangle Border

    how can we draw Round Rectangle Border for example, just like XP's Task Manager( under "performance tab" )

    HI,
    Check MacTopia's support area for Word. http://www.microsoft.com/mac/help.mspx?product=Word&app=4
    I would think you need graphics software for that....
    Carolyn

  • How to draw a rectangle with rounded corners?

    Hi,
    I'm trying to draw a rectangle in a custom annotation and my appearance stream looks like:
    1 1 98 98 re 0.5 w 1 j 0 0 0 RG S
    The re-operator draws the rectangle an the j-operator along with the parameter 1 sets the join style to round.
    It does make the corners very slightly rounded, but it's only visible when setting the zoom level 200% and beyond.
    Do any of you know how to make the corners more rounded for the rectangle?

    I thought so
    So Cubic Bézier curves all the way.
    Could you help me with it?

  • Draw multiple rectangles with mouse and allow exclusion of individual rectangles

    Hi,
    I have the following AS code to draw a single rectangle using mouse, but I need a different code that allows drawing multiple rectangles and the selection/exclusion of individual rectangles like a modeling tool (eg.: MS Visio).
    Can you help me?
    Thanks.

    What if I use MovieClips as the rectangle? When the click occurs, a new MovieClip is added dynamically to stage and when the user clicks right in a MovieClip's border it can be deleted.
    I'll try this way. And if you have any suggestions please let me know.
    Thanks.
    PS: This is the code I just forgot to include in the past post.
    const CANVAS:Graphics = graphics;
    var _dragging:Boolean = false;
    var _corner:Point;
    stage.addEventListener(MouseEvent.MOUSE_DOWN, setAnchor);
    stage.addEventListener(MouseEvent.MOUSE_UP, completeRect);
    function setAnchor(e:MouseEvent):void{
        if(!_dragging){
            CANVAS.clear();
            _corner = new Point(e.stageX, e.stageY);
            _dragging = true;
            stage.addEventListener(MouseEvent.MOUSE_MOVE, liveDrag);
    function completeRect(e:MouseEvent):void{
        if(_dragging){    
            _dragging = false;
            stage.removeEventListener(MouseEvent.MOUSE_MOVE, liveDrag);
            CANVAS.lineStyle(0, 0, 0);
            CANVAS.beginFill(0x222222)
            CANVAS.drawRect(_corner.x, _corner.y, e.stageX - _corner.x, e.stageY - _corner.y);
    function liveDrag(e:MouseEvent):void{
        CANVAS.clear();
        CANVAS.lineStyle(0, 0x999999);
        CANVAS.drawRect(_corner.x, _corner.y, e.stageX - _corner.x, e.stageY - _corner.y);

  • Draw rectangle with a double

    Hello When I draw a rectangle with
    g.drawRect(521,32,201,20);
    I have to use int for the length.
    Is it possible to draw a rectangle with a double like this
    g.drawRect(521,32,201,20.05);

    If you cast that int the int is 20 and not 20.05.
    I tried this.In terms of pixels, 20.05 is equivalent to 20...
    The value itself is only useful in double when doing computations like trigonometry or 3D.
    Whatever the type of values used, it will finally be converted to an int, so don't bother with this.

  • Creating Rounded Rectangle Outline Colour Issue

    Hi all,
    I am wanting to create a rounded rectangle, with an outline or boarder with a colour black (Or other colours). But i am unable to find where i'm able to add an outline colour as an option before drawing out the shape or after drawing the shape.
    The only option i am able to do is changing the background colour of the shape created, and i was wondering if you are able to add an outline when creating or after creating a rounded rectangles or other shapes...
    Thanks,
    James

    But i am unable to find where i'm able to add an outline colour as an option before drawing out the shape or after drawing the shape.
    Styles -> Stroke.

  • PSE 5: Creating a rounded rectangle not filled in.

    I want to create a rounded rectangle with the rounded rectangle tool, but I don't want it filled it with color, just outline / stroke.  I see it's been discussed here but I can't figure it out.  Any advance would be great.  

    Another way, in addition to the ways posted above, is to draw out
    your shape.
    Then go to layer styles and find the style set named visibility.
    There are three styles there: show, hide and ghosted. Pick the
    hide style and your color will be hidden. Then Alt+double click
    on the shape thumbnail to bring up the layer style settings
    dialog. At the bottom of the dialog is a stroke option, where you can
    choose your stroke color, size and opacity.
    The advantage of this way is you can edit the settings later by double
    clicking on the small fx beside the shape layer.
    If you wish to restore the color later, you can use the show style in the
    visibility layer style set.
    Later versions of photoshop elements work the same way.
    MTSTUNER

  • Rounded rectangle corners in FW3?

    Where the heck is my rectangle tool options panel that let's
    me round rectangle edges?!?!?!
    you may ask, why version 3? - it's 'cuz my company is too
    cheap to upgrade. I use it decently well despite this, but I
    digress.
    I thought all you had to do was double click the rectangle
    tool like it states in the help:
    You can round the corners of a rectangle or square as you
    draw it by setting the curvature of the corners in the Rectangle
    tool Options panel.
    Set this value before drawing the rectangle.
    To draw a rectangle with rounded corners:
    1 Double-click the Rectangle tool to open the Rectangle tool
    Options panel.
    2 Enter a value in the Corner text box.
    3 Hold down the mouse button and drag to draw a rectangle.
    Note: You cannot round the corners of an existing rectangle.
    The problem is, that the Rectangle tool options panel doesn't
    open!! is this a bug? or am i just missing something really
    obvious?? help!! has anyone else run into this?

    oy vey. never mind - i found it. it's so obvious that i want
    to cry. the problem was the inspector was already open and off
    underneath something that I couldn't immediately see. what a
    doofus. sorry for taking up space.

  • Premiere Pro cs6 How to adjust radius of rounded rectangle

    I think my title covers my question.
    How do I adjust radius of rounded rectangle in Premiere Pro CS6? Trying to make a lower third and don't want the exaggerated rounded corner.  Is there a way to adjust the radius of the corner?
    Thanks

    how about using the pen tool? Either place your rounded rectangle in your spot (to use as a template, guide to line up, or practice pen) and draw over with the pen tool
    or, draw your rounded rectangle with the pen (no guide)
    with the pen - properties - graphic type - choose 'filled bezier'
    EDIT - just using the rounded rectangle tool, gives the properties- graphic type - round rectangle (ah, but then I also see a 'rounded corner rectangle')
    so, change option to 'filled bezier' and either delete middle anchor point of corner and use convert anchor point tool to pull out corners
    or - change option to 'filled bezier' choose pen tool, select middle anchor point, click, hold and move to your choice
    or I have misunderstood your rounded rectangle to be either
    1. round rectangle
    2. rounded corner rectangle

  • Rounded Rectangle Line Weight problem

    I can't make a rounded rectangle with .5pt. It keeps resetting to 1pt. I am also applying a dash (1,1) to the line

    rwl3,
    You may have Align to Pixel Grid ticked in the Transform palette. You can see it when the object is selected.
    If so, you probably have Align New Objects to Pixel Grid ticked in the Options.
    To cure this, you may select everything and untick both.

  • Rectangles with colors

    <mx:Canvas id="b1" x="10" y="10" height="40" width="300" borderStyle="solid" borderColor="black"/>
    to add rectangles side by side inside this canvas i wrote the following code
    for(var i:int=b1.x;i<b1.x+b1.width;i=i+15)
                        var line1:UIComponent = new UIComponent();
                        var lineThickness1:Number = 1;
                        var lineColor1:Number = 0x000000;
                        var lineAlpha1:Number = 1;
                        line1.graphics.lineStyle(lineThickness1,lineColor1,lineAlpha1);
                        line1.graphics.moveTo(i,b1.y);
                        line1.graphics.drawRect(i,b1.y,15,b1.height);
                        this.addChild(line1);
    now I want to fill those rectangles with colored rectangles starting to ending
    i pass the units then units*15 will be calculated and the covered rectangles will be populated with colored rectangles for that i wrote the following code
                             var c:UIComponent = new UIComponent();
                            var xposstr:String = arr1.getItemAt(arr1.length).toString();
                            var xpos:int = parseInt(xposstr);
                           c.graphics.beginFill(0xFFCC00,1);
                            c.graphics.drawRect(xpos,0,numUnits*15,b1.height-2);
                            c.graphics.endFill();
                            b1.addChild(c);
                            arr1.addItem(c.x+numUnits*15);
    arr1 is the ArrayCollection
    but iam not getting the required output

    This code draws rectangle (random background color),
    var colors: Array = [0x0000FF, 0x00FF00, 0xFF0000, 0xFF00FF]
    for(var i: int = 0; i < b1.width; i = i + 15) {
         var lineThickness1:Number = 1;
         var lineColor1:Number = 0x000000;
         var lineAlpha1:Number = 1;
         var bgColor: uint = colors[Math.floor(Math.random() * colors.length)];
         var g: Graphics = b1.graphics;
         g.lineStyle(lineThickness1,lineColor1,lineAlpha1);
         g.beginFill(bgColor, 1.0);
         g.moveTo(i, 0);
         g.drawRect(i, 0, 15, b1.height - 1);
         g.endFill();

Maybe you are looking for

  • Issue in the AD replication after VM restore

    Hi, This is my first Thread in this Forum. We have a problem in our AD. Let me first give a glimpses of the environment. 2 no. of DC in the forest. It replicated with each other . Both the DC are VM on VMware ESXi VSphare host.  previously there was

  • Why can't I see mail I sent from my iPhone on any other device?

    I've had a mac.com email address for many years now, on my iPhone and my Mac (running Lion now). Here's the problem -- when I check INBOXES from device to device the contents are always the same (i.e. synced), but this is not so with SENT mail. It ap

  • Upgraded to new phone, Original Phone will not initalize.

    I upgraded to the new phone, works great. I erased the data on the old phone (original iPhone) and now want to give it to my kid to use as an IPOD. I can't get it past the Apple Logo Screen. Hooked it up to iTunes... doesn't recognize it. Now I'm stu

  • SAAJ and namespace

    Hi, I am having a problem in running SAAJ client for Axis running on Tomcat. My SAAJ code is as follows; SOAPConnectionFactory soapConnectionFactory = SOAPConnectionFactory.newInstance(); SOAPConnection connection = soapConnectionFactory.createConnec

  • MacBook Air (2012 release) not working with projectors

    I recently bought four MacBook Airs (all the new 2012 release) and I can not get any of them to work with an LCD projector. I have tried generic and authetic mini display adapters and have tried a few different projectors.  All I am able to see when