I have a small question, I'm doing some Richet images on my canvas, but nothing happened
< P> I paint a full redeffect and another stroke retact => background filled with a border. For the first "area" everything is fine, but not for the other "area" (rect2)Posts are examined The previous lesson is printed in that ritfact (Ricochet 2), where the paint is not painted Interpretation is.
I uploaded an image to my FTP server, for a description of my problem it can be easy to understand
Here's my code, I think this is a logical error?
// fill rect rect.set (fPosition, fPositionY, number [2] - 10, fRectHeight); Paint.setColor (Color.GREEN); Paint.setStyle (android.graphics.Paint.Style.FILL); Paint.setStrokeWidth (0); Canvas.drawRoundRect (rect, 10, 10, paint); // Border Paint. Setting (Color Black); Paint.setStyle (android.graphics.Paint.Style.STROKE); Paint.setStrokeWidth (3); Canvas.drawRoundRect (rect, 10, 10, paint); // Text Flat fTextSize = fRectHeight - 40; Textpaint Text Paint = New TextPaint (); TextPaint.setColor (Color.BLACK); TextPaint.setTextAlign (Paint.Align.CENTER); TextPaint.setTextSize (fTextSize); Float textHeight = textPaint.descent () - textPaint.ascent (); Float textOffset = (textHyight / 2) - textPaint.descent (); Canvas.drawText (dataStrings.getGewicht (), rect.centerX (), rect.centerY () + textoffset, textpaint); // new for new Recta2 = new Rectif (); Paint = new android.graphics.Paint (); FPositionY = fPositionY + fRectHeight + 50; Float fRectWidth = pts [2] / 2; FRectHeight = (float) (number [17] / 5); // fill rect rect2.set (fPosition, fPositionY, fRectWidth, fRectHeight); Paint.setColor (Color.YELLOW); Paint.setStyle (android.graphics.Paint.Style.FILL); Paint.setStrokeWidth (0); Canvas.drawRoundRect (rect2, 10, 10, paint); // Border Paint. Setting (Color Black); Paint.setStyle (android.graphics.Paint.Style.STROKE); Paint.setStrokeWidth (3); Canvas.drawRoundRect (rect2, 10, 10, paint); // text fTextSize = fRectHeight - 40; TextPaint = new textaint (); TextPaint.setColor (Color.BLACK); TextPaint.setTextAlign (Paint.Align.CENTER); TextPaint.setTextSize (fTextSize); TextHeight = textPaint.descent () - textPaint.ascent (); Textoffset = (texthit / 2) - textaint dresent (); Canvas.drawText (dataStrings.getLeistung (), rect2.centerX (), rect2.centerY () + textoffet, textpaint);
Comments
Post a Comment