How to fill the space between the four points of the paint method?

Hello

I have a graphics application and I want to fill the space between four points by painting method how I can do it.

can someone help me?

Try to use Graphics.fillRect which allows to fill using coordinates xy as well as a width and a height.

If the points are not rectangular, you can try to use Graphics.drawFilledPath.

http://www.BlackBerry.com/developers/docs/5.0.0api/NET/rim/device/API/UI/graphics.html#FillRect (int, 20int %, 20int %, 20int %)

http://www.BlackBerry.com/developers/docs/5.0.0api/NET/rim/device/API/UI/graphics.html#drawFilledPat... (int [], 20int [], % 20 byte [] % 20int [] %)

Tags: BlackBerry Developers

Similar Questions

  • How to add a space between the currency symbol and price?

    Hello

    Can you please guide me how to add a space between the currency symbol and price?

    Support told me this question in the forums because it is done with JavaScript and it is not covered in the official documentation.

    Any who have done this? I would like to turn 20 at 13.20 RON RON13 or 32, 90 to 32,90 USD.

    Thank you!

    Hello.

    I test and it works.

    If any who need it, this is how I did it.

    I changed the models of Modules-> page layouts of the shop online-> overall layout.

    I added at the end of the HTML code, the code following JS:

    The result can be seen here: http://magazindepiese.worldsecuresystems.com/accesorii/chimice?Page=1&Items=12

    Instead of PRICE: RON22, 62, now it's READY: 22,62 RON that is correct for the Romania.

    Thank you Mario!

  • How to fill the discharge battery on Qosmo G30?

    Hello

    How to fill the discharge battery on Qosmo G30?

    Thank you

    Hello

    Disconnect the power adapter and run the notebook until it automatically stops.
    In addition, you should disable or change the battery alert in Windows power management.

  • How to fill the canvas with lines

    < mx:Canvas id = "b1" x = "10" y = "10" height = "40" width = "300" borderStyle = "solid" borderColor = "black" / >

    When I want to draw lines with difference of 15 pixels to fill the entire canvas I wrote the following

    for (var i: int = b1.x + 15; i < b1.x + b1.width; i = i + 15)
    {
    var line1:UIComponent = new UIComponent();
    var lineThickness1:Number = 1;
    var lineColor1:Number = 0 x 000000;
    var lineAlpha1:Number = 1;
    LINE1. Graphics.LineStyle (lineThickness1, lineColor1, lineAlpha1);
    LINE1. Graphics.MoveTo (i, B1.y);
    LINE1. Graphics.LineTo (i, B1.y + B1. Height);
    this.addChild (line1);
    }

    It works very well

    LLY,

    < mx:Canvas id = "b4" x = "600" y = "200" height = "60" width = "300" borderStyle = "solid" borderColor = rotation "black" = "40" / >

    I have the canvas above with the "b4" id only difference is that this canvas rotation

    How to fill the canvas with lines that I just did above?

    Hope this code will help you,

    for(var i: int = 15; i < b4.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, 0);
         line1.graphics.lineTo(i, b4.height - 1);
         //Add line in canvas instead of main container
         b4.addChild(line1);
    }
    
    
    
  • How to call the paint of another method program

    Hello

    I have a custom BitmapField that I would like to drawText, using graphics.drawText. Previously, I had no problem, that I would call setBitmap to the paint method and it would make the drawText. However, he did an infinite loop problem, so I moved it to another function, that will affect the value manually the bmp. Now, I am unable to drawText, that I placed this code in my service object. I would, however, when I select this particular BitmapField to drawText.

    For now, since another function setBitmap is not a very good option because this will call the FieldManager sublayout which I think can be a battery problem. Is there another way I can call drawText?

    What is the reason, once again, to not draw the text from inside her object?  Why must you to setBitmap() to draw the text in the first place?

    Indeed, setBitmap() inside of object causes an infinite loop (I remember this post).  However, it should not be linked to draw text in any way, nature or form.

    Check some (members) variable inside your method object and make the draw you need based on this value.  If you want your bitmapField to draw text under certain conditions, change the value of this member and invalidate(), causing object pick up the change.

    In addition, if your FieldManager sublayout a problem, there are a problem.  Look at this code and fix the bugs rather than them with all kinds of mobile code around masking.

    If you need more assistance, please post here the pieces of code (especially how you would draw the text when it worked) and we'll figure out something.

  • How to remove a path between two anchor points

    Hello

    everything is in the title,

    could you tell me please how to remove a path between two anchor points without using the tool Eraser path?

    When I select these two folders and press to remove all disappeared.

    PS: I want to keep the anchor after the removal

    Thank you

    with the Selection tool direct (white pointer), click the path segment (no points) or select slide above without going on something else and tap on delete.

  • Dialog box in the paint method

    I have an IllegalStackSizeException when I try to display a dialog box in the paint method.

    Here is an example:

    [Edit] Welcome to the forums! [/ Edit]

    Do you really need that Dialog.inform there? It's a very bad idea to have one any initiated interaction in paint, because it is called at unpredictable times. Worse still is the idea to execution of the painting of the block .

    If you absolutely, desperately need some user interface action will be initiated by paint (and frankly, you don't want to do), put it in invokeLater. Even if the painting is performed on the EventThread, you must leave the BB frame finish his current job, then come back and do something new.

    Dialog.Inform is a nice debugging tool, but it has its limits. You simply press one.

  • Problem with the Paint method

    Hello guys,.

    I develop a map-like application,

    the screen contains key components of towing,

    -on the upper part is an ObjectChoiceField where the user can select a card

    - and below which is on the plan that the user has selected

    The problem is that I use the paint method to allow the user at the image of pain, what causes my ObjectChoiceField to disappear. Any help? Please be easy on me, I'm totally new

    Example Code:

    private static final int HORZ_SCROLL_FACTOR   = 10;
        private static final int VERT_SCROLL_FACTOR = 10;
        int left = 0;
        int top = 0;
        int maxLeft = 0;
        int maxTop = 0;
    
        final String choices[] = {"3", "4", "5", "6", "23"};
        private ObjectChoiceField choiceField;
    
        private BitmapField imageOutputField;
        Bitmap bitmap;
    
        public NetworkingMainScreen() {
    
            setTitle("AUC Maps");
            imageOutputField = new BitmapField();
            choiceField = new ObjectChoiceField("Pick a Map:", choices)
            {
                protected void fieldChangeNotify(int context)
                {
                    getURL();
                }
            };
    
            add(choiceField); // doesn't appear
            add(new SeparatorField()); // doesn't appear
    
            add(new LabelField("Map retrieved:")); //doesn't appear
            add(imageOutputField);
    
        }
    
        protected void paint(Graphics graphics) {
            if (bitmap != null) {
                graphics.drawBitmap(0, 110, imageOutputField.getBitmapWidth(), imageOutputField.getBitmapHeight(),
                        bitmap, left, top);
            }
        }
    

    You try to create a screen where you can move an image larger than the screen?

    Try this:

    http://supportforums.BlackBerry.com/T5/Java-development/create-a-scrollable-image-field/TA-p/444955

    Have the user choose the card before arriving at the screen or use more menu items.

    The moving image field must focus to work properly. This scrolling while being able to focus on the ObjectChoiceField image will be delicate.

  • How to fill the space between the brush strokes, like you can with a direct trace of paint?

    Hello

    I'm currently under OS X El Captain on my Mac, v. 10.11.1. I use the version of Illustrator 2015.

    I imported a sketch and drawn on a calligraphic brush. (I've created a new for the effects of pulling on my Tablet pressure sensitivity). I assumed that I would be able to use live paint tool to fill in the spaces with the color as you can with a path created from the pen tool. I do not speak only to fill a closed shape, but when the incomplete paths touch. Except when I'll make the paint option, it is up to my strokes applied to regular paths - the pen tool. I used the brush to get the effects, so I really want that stay the same and not be uniform in the thickness of line.

    Basically, is it possible that I can use paint dynamic to fill the white spaces between the lines created with a brush, while keeping the effects of this brush? If I can't use the live paint is there another way I can fill in these spaces as I'm using live paint?

    Thank you very much!

    You will need to develop stories, or duplicate your layer, expand that, make your form of direct painting and delete everything on your new layer, but your new form.

  • Chart WPF: How to add a space between the labels and tick marks

    I would like to know how to set a margin between the main graduations and their labels in a chart for WPF.

    Especially in the x-axis labels are placed very close ticks.

    Unfortunately, there are no existing configuration property to add an extra space around the scale labels. I created a task to address them in a future version of Measurement Studio.

    To work around the problem, you can use a string format that includes extra whitespace in the result:



            

                

                    

                        Format="{}{0} " />

                    

                

            

        

    If you need a check, you can create a custom label presenter to add extra space for the generated label visual.

  • How to add a space between the two tabs in accodion widget?

    Hello! I use the accordion widgets and try to add space between each of the tabs, would someone help me with that. Thank you

    Directly edit the output of Muse is virtually always a bad idea. At the very least, it will create a very heavy workflow because the Muse will overwrite your changes each time you re-export (export, download, publish, preview).

    It depends exactly what visual effect you want to achieve, but you probably need to just select the Accordion widget and use the spacing Panel to adjust the value of vertical gutter.

  • How to fill the empty space when the component is not visible or hidden?

    I have several components in BorderPane which can be visible or not using not check box. When I put the component not to be visible, I get an empty space I want to complete resizing the next component. What options are available to configure the components to fill the empty space when the component is defined on .setVisible(false); ?

    So that a node only takes place when it is invisible,

    before you change the visibility property, call:

    node.managedProperty().bind(node.visibileProperty());
    

    Or you can simply remove the node from the graphic scene:

    parent.getChildren().remove(node);
    
  • How to add a space between the pages of Indesign CC spread

    Hello

    I'm looking for an answer to add a space between pages to spread, but I have found none, not DC at least. Can someone help me please?

    In the attached picture is the exported PDF, you can see that the two pages are similar to one.

    img.png

    Thanks for your help!

    Julius

    If all you want is to see a gap of page when you view a PDF file in Acrobat, export to PDF from InDesign mayonnaise. When the single page PDF is ready, open it in Acrobat and go to view > Page Display and implement two continuous. For the first page on its own, select view > Page Display > Show Cover Page during two places.

  • Ideas: Insert an error code or give a brief description of what you are trying to accomplish or fix.__media center tv shows only tv in the Center 3 "inches of black on both sides how I filled the screen

    Television Media Center only one tv in the dark on both sides of Center 3 "inches, how do I fill the screen e-machines 600 GB

    Hello, Russell

    Windows Media Center will use as possible while maintaining the proportions of screen space. If you have a TV screen and watch a video 4:3 standard, it will keep the bars on the side.

    You can change the level of zoom in now the keys CTRL and shift and press 'Z' to scroll through the different zoom levels so that it fills the entire screen at your convenience, but keep in mind that you will not be able to see the full image if the proportions of the video does not match your TV.

    David
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • How to fill the forms/interiors?

    How to describe this written?...

    Let's say you have a form of vector of ring.  It's a circle with a hole in the middle.  Apply a fill does not fill the hole because the hole is not part of the shape, it's just space.  How you fill out that form/space?

    Thank you.

    NJ

    Use live paint.

Maybe you are looking for

  • Can't set up Firefox (29.0.1) "never remember history".

    Attempting to set Firefox (29.0.1) to "never remember history" do not work. It boils down to "not forget history."

  • Need some guide to the Qosmio F50-108

    Hello I was wondering if I can get a guide how on my qosmio F50-108... my fan makes a big noise really.I want to check what is going on... my warranty has expired 4 months ago... So can I get a guide please?

  • How can I get a new tab opens automatically as my homepage instead of a vacuum?

    I want to click on the button of the tab and have my home page appears in the new tab instead of a blank page. Is this possible and, if so, how do you?

  • AVI files

    Doesn't seem like a Mac (Imovie) recognizes an avi file created by a PC. Any who have the same experience and how to overcome it?

  • HP Envy 17 laptop &amp; 5 GHz

    Hello I have a HP Envy 17 laptop PC (product number: F7T68EA #ABU) and I do not see the network wireless 5 GHz with her. I understand that he supported 5 GHz and 2.4, but no joy still see the network - can be seen very well on iPhone and older laptop