http://stackoverflow.com/questions/1414 ... n-teechart
TJ71016479
Will this be added in the maintenance release? This feature is very important for me!
Shadow color for header?
Re: Shadow color for header?
Hello,
I've revised it and I found a fix for it. So yes, the next maintenance release will include this fix.
I've revised it and I found a fix for it. So yes, the next maintenance release will include this fix.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: Shadow color for header?
Could you please share the patch for this bug?
Re: Shadow color for header?
This is what I came up with. Correct?
Code: Select all
protected void drawString(int x, int y, final String text, final ChartBrush brush) {
// FIX:
Paint fontPaint = brush.getPaint();
fontPaint.setTextSize(font.getSize() * (float)(chart.getAspect().getFontZoom() * 0.01));
// Paint fontPaint = font.getPaint((float) (chart.getAspect().getFontZoom() * 0.01));
Re: Shadow color for header?
Hello,
The fix I applied was a bit different but your suggestion looks better to me. The next maintenance release will include it.
The fix I applied was a bit different but your suggestion looks better to me. The next maintenance release will include it.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: Shadow color for header?
I'm wondering if you should also set these:
fontPaint.setTypeface(font.getTypeFace()); // getTypeFace() needs to be implemented
fontPaint.setUnderlineText(font.getUnderline());
fontPaint.setStrikeThruText(font.getStrikeout());
fontPaint.setTypeface(font.getTypeFace()); // getTypeFace() needs to be implemented
fontPaint.setUnderlineText(font.getUnderline());
fontPaint.setStrikeThruText(font.getStrikeout());
Re: Shadow color for header?
Hello,
Right, the fix you suggested breaks these properties.
The fix I initially used doesn't, so it could be better to use it:
Right, the fix you suggested breaks these properties.
The fix I initially used doesn't, so it could be better to use it:
Code: Select all
protected void drawString(int x, int y, final String text, final ChartBrush brush) {
final Paint fontPaint = font.getPaint((float) (chart.getAspect().getFontZoom() * 0.01));
fontPaint.getTextBounds(text, 0, text.length(), textBounds);
textSize.width=textBounds.width()+2;
textSize.height=getFontHeight();
//TJ71016479
if (fontPaint.getColor() != brush.getColor().getRGB())
fontPaint.setColor(brush.getColor().getRGB());
//...
}
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |