How to overlay text on a BitmapField?

Everything is in the title

AM new rim user interface programming and I need to overlay text on my BitmapField, any idea?

Thank you!

There are several possibilities.  Here's one (assuming you want to add more than one piece of text to your BitmapField):

(1) create your own class that extends BitmapField - say, MyBitmapField

(2) have a static inner class with three members - string text, int hOffset, int vOffset. Call the TextPiece. Have a TextPiece (String, int, int) constructor in this category.

(3) have a member of vector in MyBitmapField that will contain all your pieces of text. Call allText.

(4) create an addText (String text, int hOffset, int vOffset) method which calls allText.addElement (new TextPiece (text, hOffset and vOffset)); and invalidate();

(5) having a painting replace similar to the following:

protected void paint(Graphics g) {
  super.paint(g);
  g.setColor(desiredFontColor);
  int size = allText.size();
  for (int i = 0; i < size; ++i) {
    TextPiece tp = (TextPiece) allText.elementAt(i);
    g.drawText(tp.text, tp.hOffset, tp.vOffset);
  }
}

(6) probably also need a method of clearAllText()...

Tags: BlackBerry Developers

Similar Questions

  • IMAQ overlay Text.vi: 'police user-specified' ignored

    I try to use "IMAQ Overlay Text.vi' use draw width fixed tag on an image. In my testing so far, I can't determine how to use another font, but the default value. The choice of "fonts specified by the user" seems to ignore my requests for fonts, but use my size and parameters "BOLD".

    What I've tried so far:

    • Use LabVIEW to tell me the names of police via the application and then drop type one word for word in the component 'font name' of the pole "font of the specified user.
    • Use a different program Windows (like Write.exe) to give me the names of fonts and then typing a in verbatim as before.
    • Use a font of nonsense name to cause some sort of error "font not found", but none have been raised.

    This third data point makes me think that a default font is selected if the user is not. How can I learn which names of fonts will use this VI? LabVIEW can see and use the font that I want, but not IMAQ :-(

    I have 2009 LabVIEW with Vision Development Module of 2012.

    Check the built in example... This works.

  • How to prevent (text) messages to display on my tv using my iPhone to the apple tv airplay?

    How to prevent (text) messages to display on my tv using my iPhone to the apple tv airplay?

    If you use, you can not, since that's what mirroring is mirroring, it reflects your screen. If the content you watch support it try to turn the mirror off the coast and just use airplay to base.

  • FF22 parameters adjusted to resize the large icons - but the text user interface - (bookmarks, etc.)-is too small to read... How to enlarge text in user interface only?

    I adjusted the FF22 settings to resize the icons large - but the text of the UI - (bookmarks, history, etc.)-is too small to read... How to enlarge text in user interface without enlarging the text of the page Web - or re - expand FF22 icons?

    Have you tried the extension?

  • How to get text messages that have been deleted?

    How to get text messages that have been deleted?

    Assuming that these text messages have been saved, you can restore your backup iPhone.

  • How I distributed text multi cells

    3.6.1 the work number.  How to enter text and spread it over several cells.

    Select the cells, and then select the menu item "table > merge cells.

    I must warn you to be aware that strange things happen with sorting and others when the cells are merged.

  • How to make text appear n disappear?

    When an event is true, a text appears on the front panel. If set to false, the text disappears.

    I know that we can use a property node for other things like the LED, but I have no idea how do for text.

    Pls help.

    p/s - say nothing pop ups

    TQ

    Hi fmpfmpf,

    You can use an indicator of the chain. Place outside your case our structure to specify a different value for your different instances of the event.

    Mike

  • How to add text to a .jpeg image

    Place the text on JPeg image

    Anyway is to place the text on JPeg image?  My Artisan 800 printer has a drawer to print photos on the cd with a top label, but I want to add text to the image for example the date and title of the DVD.

    Anyway is to place the text on JPeg image?  My Artisan 800 printer has a drawer to print photos on the cd with a top label, but I want to add text to the image for example the date and title of the DVD.

    ===========================
    The free Picasa software has several options
    to add text to pictures.

    Picasa
    http://Picasa.Google.com/

    After you download and install Picasa...
    Open the program and double left click
    an image to open the editing functions.

    To add text to the front of the photo...
    choose... Simple retouching / text button...

    More info...

    How to add text to your Photos using
    Google Picasa 3
    http://www.ehow.com/how_4599330_text-photos-using-Googles-Picasa.html

    Volunteer - MS - MVP - Digital Media Experience J - Notice_This is not tech support_I'm volunteer - Solutions that work for me may not work for you - * proceed at your own risk *.

  • How about the text of the .txt file output?

    This is my code:

    #include "iostream.h".

    #include 'fstream.h.

    ofstream myfile;

    MyFile.Open ("C:\test.txt");

    MyFile < < 'text ';

    MyFile.Close ();

    But it occurs the error C1083: cannot open include file: 'iostream.h': no such file or directory.

    How about the text of the .txt file output?

    I would suggest that you do in the InDesign style to match...

    InterfacePtr stream (StreamUtil::CreateFileStreamWrite (...);

    if(Stream->GetStreamState() == kStreamStateGood) {}

    flow-> XferByte (buf, size);

    flow-> Flush();

    }

    flow-> Close();

    There are lazy as CreateFileStreamWriteLazy equivalent methods.

    Deferred methods will open the file in the application, but you will always get a valid pointer.

    See docs on its use.

  • I just joined and have acrobat/cloud but can't figure how to change text on my document?  Can someone help me?

    I just joined and have acrobat/cloud but can't figure how to change text on my document?   Can someone help me?

    Hi annc36037142 ,

    I would like to point out that after installation of Acrobat Pro DC, open the document & tools 'Edit PDF' option, you can edit PDF files.

    Please refer to this article:- https://helpx.adobe.com/acrobat/using/edit-text-pdfs.html

    I would like to know if it works.

    Kind regards

    Christian

  • How to 'split' text mode 'HTML5 canvas "?

    'Split' option is greyed out in HTML5 canvas. Is it bug or feature? How break apart text or convert the text to a path access/plan?

    Thank you

    Hi Marek,

    In addition to the Typekit web fonts, Google fonts are now supported in HTML5 canvas documents in the last update of CC animate (15.2.1) comes out.

    See here: new feature summary (June and August 2016)

    By using the Google fonts to animate CC

    Update your copy of CC animate through the creative application of cloud and try it!

    Thank you!

    Mohan

  • How to type text on an image.

    How to type text on an image. Please tell me all the steps to get there. Thank you

    Using the interface of DW...

    1. from the Design view, click the container that you want the image it

    2. in the CSS designer (SHIFT + F11 if it is not open) click on the + sign for selectors

    3. in the Properties section of the CSS designer, make sure Layout (first tab) is chosen and scroll down to the background image

    4. click the field next to the url to activate

    5. click (icon) and choose an image in your defined Site

    6. the rest of the image background functions that you like

    7. in Design view, click the empty container and add your text

  • How to rotate text static horizontal 90 degrees?

    How to rotate text static horizontal 90 degrees?  Flash 8 had a rotation button in the properties panel

    Figured it out.  You must set the text to vertical.  Then, select the text and the spin button will be displayed.

  • How to disable text recognition in adobe PDF export? I'm used to be able to do this.

    How to disable text recognition in adobe PDF export?

    Hi phoebel,

    I'm sorry, but this option is no longer available when exporting PDF files.

    Kind regards
    Nicos

  • Insert text in a jpg file space? How to insert text into a picture file?

    How to insert text in a space from a jpg file?

    If you are wanting to use the text of the flattened jpg file, you will need to make a selection of the text. Without seeing it, I guess that using the wand would work to select. Then you can press cmd/ctrl-J to put it on its own layer, and either move it or move it to a new file. Your best option would be to find the font and use the editable text. Save as a jpg destroyed the ability to edit the text, then save it as a PSD and then save for web to your jpg.

Maybe you are looking for

  • Slow rate of AirPlay

    I use AirPlay to get streaming football online (from the Australia, is not available outside the internet streaming via browser) my MacBook Pro (via the wifi of 5 MHz) to my Apple TV and then (via HDMI) to my TV big screen. When the action on screen

  • Organize Photos v1.5.

    I am trying to understand the structure of organizing Photos version 1.5. All of the tutorials show four tabs at the top of the page. I don't see of fours. Help, please.

  • Portege M400-103 powers - the automatically every morning at 09:00

    My Toshiba Portege M400 powers - the automatically every morning at 09:00. All auto market options are disabled and also my version of BIOS is upgraded to the latest version 3.20. It is very embarrassing for me because at 09:00 I'm in my car, and my

  • A2109 2 problems with networking and an HDMI output

    I had an A2109 for Christmas and have 2 occurring of questions that I need help on. 1. I was never able to get the HDMI to work. I tried 2 different cables, as well as 2 different TV and when I plug the microphone to the Tablet and the TV, my TV cabl

  • DynDNS and NAT

    Hello Being new in the Cisco field, the notement in CLI, I have two small problem that may be related. The LUN DDNS update is not done and not of the NAT doesn't work, someone could maybe help me Here is the config of the CISCO881-K9 !!!!IP dhcp dns