How to draw the text vertically?

Hello friends,

I want to write some text vertically. I use all the DrawStyle to do this but I have no success...  Please help me to write text vertically.

See picture for more clearification I want to draw.

Kind regards

Krishan Kant

Hi key_key,

Try this code

int thetaFixed = Fixed32.toFP (90);
        
int cell_11 = Fixed32.cosd (thetaFixed);
int cell_12 = - Fixed32.sind (thetaFixed);
                    
int cell_21 = Fixed32.sind (thetaFixed);
int cell_22 = Fixed32.cosd (thetaFixed);

int [] transform = new int [] {cell_11, cell_12, cell_21, cell_22, 0, 0};
Font myFont = Font.getDefault () .derive (Font.BOLD, 17, Ui.UNITS_px, Font.ANTIALIAS_STANDARD, 0, transform);
        
LabelField lab = new LabelField ("Hello");
lab.setFont (myFont);
        
Add (Lab);

You can also set this font for the graphics object in any method of paint if you need.

Thank you.

Tags: BlackBerry Developers

Similar Questions

  • How to format the text vertical line head

    I have a spreadsheet of list of control with a large number of lines. Since I fill the cells with ✓ or keep them empty I would transform the text of head of line in vertical direction to get the width of the worksheet as small as possible.

    How can I get this format?

    Hi FMW.

    Numbers are not (yet) allow the cells of a table should rotate. Of workaround puts on the header line text boxes.

    See this tip for the user:

    Rotate the contents of the cell to 3 numbers: workaround

    Kind regards

    Ian.

  • How to get the text that is centered vertically in the box of Li

    I update the website of our company in another area of the system is why you will see a tf in the web address, that I am about to give.

    http://www.essentialfinance.NET/TF/products/reconciling/accruals_manager.asp

    Now, the problem I have is that the options in the boxes are aligned at the top.

    I had a problem understand quite how to get these boxes to work so that they show when hovering etc, but eventually came through a tutorial that appears to create a class of nav hanging to the ul.

    I tried to change all ul.nav, li ul.nav, ul.nav one is regarding the text vertical alignment centered but without success.

    The css file is here:

    http://www.essentialfinance.NET/TF/main.CSS

    I put this link because someone may be able to choose my faults.

    I just put a link to # (not going anywhere) to get the < a > code initialized...

    In fact - don't worry about the color scheme... it's only temporary to test the feature.

    And I would not wander anywhere else on the site - it's a shambles that is why I am interested in it.

    Can someone please advise? Thank you very much in advance for any comments.

    Terry

    For the ul.nav one rule, delete the height attribute.  Then add the padding attribute in this same area.  The padding will give you the height of the button you are looking for without setting the height, which is the typical way to do it.  About 10 to 15px padding should do the trick.

  • How to clear the text on the image

    Hello

    I have a screen with the background image (bitmap). I draw the text and other images on this background to aid graphics object and all looks ok when I show the screen - but only the first time because the next time background image is one containing all these designs on it.

    I would like to know if it is possible to erase these drawings, so next time I can use background image to draw top again?

    I use something like this:

    String fText = "Text";
    
    fBackground = Bitmap.getBitmapResource("background.png")
    
    fGraphics = new Graphics (fBackground );
    
    fvm1 = new VerticalFieldManager()
    {     
    
    public void paint(Graphics graphics)
    {
       fGraphics.drawText(fText, 0, 0);
    
       graphics.drawBitmap(0, 0, fBackground.getWidth(),  fBackground.getHeight(), fBackground, 0, 0);
    
       super.paint(graphics);
    }
    }
    

    Next time I want to draw text 'Text2' so I change variable fText to "Text2". How can I remove the 'Text' text before doing this?

    Thanks in advance.

    You really want to paint on the bitmap background to show change data.

    One of the most obvious solutions is to have fields for that--both the LabelField and RichTextField are good for displaying text, BitmapField is good to display bitmaps (use setBitmap to change the image), GaugeField is ideal for the indication of the percentage, etc..  Add the fields to your VerticalFieldManager, use the margins and the bits of style such as FIELD_HCENTER to space and position them the way you want and enjoy. When comes a new value to display, change the field matching and nullity. This is the right way to do these things.

    Of course-, since you seem to be attached to the use of the graphics directly - the quick and dirty approach is just to paint directly on the screen using the Graphics object passed in object.  Something like this:

    fBackground = Bitmap.getBitmapResource("background.png")
    
    // fGraphics = new Graphics (fBackground );
    
    fvm1 = new VerticalFieldManager()
    {     
    
    public void paint(Graphics graphics)
    {
       // fGraphics.drawText(fText, 0, 0);
    
       graphics.drawBitmap(0, 0, fBackground.getWidth(),  fBackground.getHeight(), fBackground, 0, 0);
       graphics.drawText(fText, 0, 0); // plus any other draws...
       super.paint(graphics);
    }
    }
    

    Of course, you must also override sublayout() to this VerticalFieldManager to properly define its dimensions.

    However, doing it this way is really strange. You must be something much simpler than a VerticalFieldManager to paint in it (expand, replace its layout() setExtent() correctly and his object to do any painting you need - do not call the super.paint (), it is abstract) or you add fields to it as usual and let the super.paint () do its job.

  • How to get the text have the same effect as the video?

    Hello

    For the first time post here, but I wonder how to get the text of the titles have the same effect as the video behind her.

    For my video, I use 'bad tv' and other effects such as Gaussian that obviously changes the appearance of video, creating the look of VHS. However, I then inserted text via the title, but it normally appears. How can I make this text have the same effects as the video behind it?

    A friend told me I might need to add text to the video first, then do the effects, I have not tried, but wonder if there is an easier way, as this would require me to restart.

    EDIT: That's what I'm looking for. https://youtu.be/7_2PHQI89dI?t=24s The text has the same effect as the video.

    Thank you

    One way is to create a clip made up based on the title and the original clip. Then apply the effect.

    Another way is to use an adjustment layer.

    Good luck.

    Russ

  • How to make the text bigger in youtube! Cubs in youtube!

    I made the largest text where google search arrives! But when I go on youtube the text is much tinier and I 65 to cataract and I can't read the text at right! How to make the text bigger in youtube? Thank you very much! I tried everything, but nothing changes the size!

    When you view this page hit {Ctrl + 0} < is a zero number -to reset the zoom level for this area.

    https://support.Mozilla.com/en-us/KB/page+zoom

    If you move the scroll wheel, and are now the CTRL key, you can change the zoom level of the page that is viewed - both in & out.

  • How to make the text darker or bolder

    How to make the text darker or bolder in safari

    shutterbox-

    I'm with you.  Cataract surgery, it will take longer, and the thin, plugged in my humble OPINION, typeface they chose is really for less than 40 eyes.

    The same "BOLD" of the police system capacity would be so appreciated.

    There are 3rd party apps that can change system fonts, and I saw messages claiming success, but I'm a purist to try.

    Small fonts (to us) make it very painful to be here.  I just hope they realize that our needs must be met, as well.

  • How to close the bookmarks vertical inscription in my browser window?

    How to close the bookmarks vertical inscription in my browser window?

    .. .of RACE! I should have looked more closely, as the 'x' was camouflaged by my wallpaper. Thank you.

  • How to Flash the text Message text in CVI

    Hi, anyone know how to Flash the text in a text control in CVI.

    Thanks for any help

    Unfortunately, there is no such simple method for flashing text.

    You must code explicitly.

  • How to change the text in the paint once I clicked outside of the text box?

    How to change the text in the paint once I clicked outside of the text box?

    How to change the text in the paint once I clicked outside of the text box?

    ====================================
    I guess you could go to... Change / Cancel... then again...

    FWIW... the free Picasa software has tools to add text to photos.

    Picasa
    http://Picasa.Google.com/

    How to add text to your Photos using
    Google Picasa 3
    http://www.ehow.com/how_4599330_text-photos-using-Googles-Picasa.html John Inzer - MS - MVP - Digital Media Experience - 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 to set the text back in webview?

    Hello

    Someone knows how to put the text in full screen according to the 2 screen capture?

    Code

    import bb.cascades 1.0
    
    Page {
        Container {
            //Todo: fill me with QML
            ScrollView {
                id: scrollView
                scrollViewProperties {
                    scrollMode: ScrollMode.Both
                    minContentScale: 2
                }
                WebView {
                    id: webView_Condiciones
                    url: "local://assets/html/copy_Right.html"
                }
            }
        }
    }
    

    screenshot 1 (I got the result as below)

    Screen Shot 2 (need to result as below)

    So let me know what I did wrong?

    Hello

    I think your problem is

     minContentScale: 2
    

    Ask yourself the ScrollView to zoom in on your web pages display... Zoom will make wider and higher...

    If you just want more large print, try something like this:

    import bb.cascades 1.2
    
    Page {
        Container {
            //Todo: fill me with QML
            ScrollView {
                id: scrollView
                scrollViewProperties {
                    scrollMode: ScrollMode.Both
                }
                WebView {
                    id: webView_Condiciones
                    url: "local:///assets/index.html"
                    settings.defaultFontSize: 32
                }
            }
        }
    }
    

    With this HTML code:

    
    
    
    Hey There
    • Lorem ipsum dolor sit amet, consectetur adipiscing . . . . . . . . . ---8<-- SNIP -->8--

    I see:

  • How to get the text of a SystemPrompt (Cascades)

    Hello

    I've been struggling with this for a few hours now. I followed the example of "dialogues" on github, so I have successfully created a SystemPrompt (the dialog box that allows the user to enter text and accept / reject). Curiously, in this example there is no use of user text input. Do you know how to get the text in my QML? Here you have an example of code that I use:

    My QML:

    // Default empty project template
    import bb.cascades 1.0
    import bb.system 1.0
    
    // creates one page with a label
    NavigationPane {
        id: navigationPane
        Page {
            attachedObjects: [
                SystemPrompt {
                    id: prompt
                    title: qsTr("Enter a text for the label")
                    modality: SystemUiModality.Application
                    inputField.inputMode: SystemUiInputMode.Default
                    inputField.emptyText: "Label text..."
                    confirmButton.label: qsTr("Ok")
                    confirmButton.enabled: true
                    cancelButton.label: qsTr("Cancel")
                    cancelButton.enabled: true
                    onFinished: {
                        if (result == SystemUiResult.ConfirmButtonSelection) {
                            lab1.text = ????? // Here is where I don't know what to do
                        }
                    }
                }
            ]
    
            Container {
                layout: StackLayout {}
    
                Label {
                            id: lab1              text: "Label text"
                    objectName: "lab1"
                    textStyle.base: SystemDefaults.TextStyles.TitleText
                    horizontalAlignment: HorizontalAlignment.Center
                }
    
                Button {
                    text: "Update label"
                    horizontalAlignment: HorizontalAlignment.Center
                    topMargin: 150.0
                    onClicked: {
                        //_appUi.editLabel();
                        prompt.show();
                    }
                }
            }
        }
    }
    

    Be sure to add this in your .cpp file or all of app:

    #include 
    #include 
    #include 
    #include 
    #include 
    #include 
    #include 
    #include 
    #include 
    #include 
    

    and don't forget to include them in your app .cpp file (probably not all are needed, but just in case I leave here for the moment):

    qmlRegisterType("bb.system", 1, 0, "SystemUiButton");
        qmlRegisterType("bb.system", 1, 0, "SystemUiInputField");
        qmlRegisterType("bb.system", 1, 0, "SystemToast");
        qmlRegisterType("bb.system", 1, 0, "SystemPrompt");
        qmlRegisterType("bb.system", 1, 0, "SystemCredentialsPrompt");
        qmlRegisterType("bb.system", 1, 0, "SystemDialog");
        qmlRegisterUncreatableType("bb.system", 1, 0, "SystemUiError", "");
        qmlRegisterUncreatableType("bb.system", 1, 0, "SystemUiResult", "");
        qmlRegisterUncreatableType("bb.system", 1, 0, "SystemUiPosition", "");
        qmlRegisterUncreatableType("bb.system", 1, 0, "SystemUiInputMode", "");
        qmlRegisterUncreatableType("bb.system", 1, 0, "SystemUiModality", "");
        qRegisterMetaType("bb::system::SystemUiResult::Type");
    

    Thank you very much

    If you look very carefully by the docs, you'll trip over https://developer.blackberry.com/cascades/reference/bb__system__systemprompt.html#inputfieldtextentr...

    So, replace your? with inputFieldTextEntry() and you will get the text you need.

  • How to draw the graph of output?

    Hello

    How to draw the graph of an exit? is there any api for it?

    The short answer is that there is no API, but you can create your own field if you want to, and here are some samples:

    http://supportforums.BlackBerry.com/T5/Java-development/create-graph-fields/Ta-p/444968

    I recommend the search before you ask questions to see if other people have asked similar questions.  If you type chart in the search box you will find other similar topics.

  • How to draw the 3D dice?

    Anyone know of a tutorial or an example to learn how to draw the 3D dice in Adobe Illustrator?

    I actually found a link to a tutorial on how to do it, but don't know if the announcement of such a link is allowed in the forum. (I'm new here.) He quite far up to a certain time and then it becomes unclear how one of the steps, or I don't know enough yet about using Illustrator to understand what he says to do. In any case, I get so far and then I can not look polished. I understand the basics for creating a drawing in 3 dimensions, so don't looking for this.

    OK, I got quite a breakthrough!

    I went ahead and have materialized to where I got the same result as above, where only the side '6' watch points, while the other two are blue.

    But then I was playing with the outline, making visible/invisible parts. That's when I noticed, there was the '4' and '5', but they were BEHIND the blue. Not before blue as I expected.

    It's simple. Only, I selected the two blue faces and used object/rearrange/send backward to position behind the faces dotted.

    After that, I was also able to select the blue edges and put a radiant on them. It is not yet exactly as this step in the tutorial, not until I find how the gradient tool. But I'm certainly happen.

    At this point, it looks like:

    And that is a SIGNIFICANT improvement on what I had before, if I say so myself. At this point, I'm probably on my way to following through with the tutorial, I started from.

  • How to wrap the text to &lt; af:commandLink &gt;

    I am building a web application using Jdeveloper 11.1.2.3 fusion

    Question: How can deform the text for < af:commandLink > ?

    < Af:outputText > component there is merit called noWrap where I can choose wrap the text or not. In my case, I have a long title that defined as < af:commandLink > and I want to surround the text of the link, but there is no such opportunity. If it possible anyway, please share information with me. Thank you

    Hello Salman,

    You can use the text output within the command binding and then on top of the textbox output use the style class - inlineStyle = "" white-space: normal; ""

    Thank you

    Prabhat

Maybe you are looking for

  • The quirks with VI in LPx? And how long to install?

    Get ready to make the move to LPx, but wanted to confirm it is no weird bugs using virtual instruments. I have a few Kontakt and a few others that I trust.   If someone is working with an iMac 2.93 i7, what performance? Also... I do my iMac to work,

  • I CAN'T INSTALL SKYPE ON MY PC

    Hi I just tried to install Skype on my computer after I have Skype dezinstalled and it says that it is a problem with the connection to the server... Can anyone help me?. See you soon

  • Mobile phone for Tecra A4 photo transfer

    is anyone know how you can get the photo taken with a cell phone nokia6070 in a computer laptop tecra A4? It is supposed to work with infrared technology, even if I can't find the infrared receiver on the laptop (when it exist?). Thank you very much!

  • 2 triggers with PCI-5124

    Hello I would really appreciate if you could give me some advice on my digitizer NI 5124 acquisition trigger. Basically, what I'm trying to do is this: 1 make an acquisition triggered (using an analog edge trigger). My signal goes in channel 1, the t

  • Unable to connect to the internet after the installation of security updates

    Original title: whenever I have install a windows update and restarting, I can't connect to the internet. updates of the problem are all updates of security Another problem - whenever I try to download a game comes the message that the download is in