Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8618435
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T06:06:31+00:00 2026-06-12T06:06:31+00:00

I have some code setup in an extended view which does some drawings which

  • 0

I have some code setup in an extended view which does some drawings which are easily scaled (vector-like). (My scale is setup as 0-1.0)

I noticed that when I set my paint fill to FILL, the text drawn on a path looks correct, but when I set the fill to stroke (I just want the outline of the text) the image looks like it is on some LSD trip. Here is my sample code :

    Paint yellowPaint = Paints.getFillTextPaint(0.01f, 0xFFffea3e, 0.065f);
    canvas.drawTextOnPath(mContext.getString(R.string.building_a_partnership),
             Paths.getRoundedTextPath(mOuterCircleRectF, 280f, 350f),
             0, -0.025f, yellowPaint);

public static Paint getFillTextPaint(float f, int color, float textSize) {
        Paint textPaint = new Paint();
        textPaint.setFlags(Paint.ANTI_ALIAS_FLAG);
        textPaint.setStyle(Paint.Style.FILL);
        textPaint.setColor(color);
        textPaint.setTextSize(textSize);
        textPaint.setStrokeWidth(f);
        textPaint.setShadowLayer(0.002f, 0.0f, 0.0f, 0xFF000000);
        textPaint.setTypeface(Typeface.SANS_SERIF);
        return textPaint;
    }

If I change the Paint.Style from FILL to STROKE I get the images below. I have used the canvas.drawText() and it works fine showing the stroked letters. It is only when it is applied to a Path, when it seems to get all weird.

Fill Image

Stroke Image

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T06:06:32+00:00Added an answer on June 12, 2026 at 6:06 am

    Apparently this is due to the fact that my scale factor is 0-1.. There appears to be a bug w/ how rendering a stroke with size < 1.0 is treated. Suggested solution is to use a scale of 0-100..

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some setup code in my functions.php file that sets permalinks and adds
I am trying to setup a few fixes in some code that have caught
I have some code which takes strings representing hexadecimal numbers - hex colors, actually
Context: Windows7, VBScript, ADODB and ADOX. I have written some VBScript code which creates
I have some VB code which makes use of a COM api and results
I'd like to have some code be notified of any incoming and outgoing voice
I have some code setup to remove extra spaces in between the words of
I have setup some code on JSFiddle. The jQuery :contains selector works fine in
We have some code that must access low level windows XP os calls which
I have some code where I have a button that I'd like to create

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.