SerieRegion with pattern - PDF export
SerieRegion with pattern - PDF export
Hi,
I have some problems when i want to print (in pdf throught PDFCreator in attachement) a chart with a serie region using a pattern.
1- Pattern seems to be zoomed and streched when canvas size is changed before print. The rendering is really not acceptable
2- Contrary to old version (Delphi 9 & Teechat v8.08), filled area seems to be a picture and not vectorial. Besides, pdf file size is very larger!
I use Delphi XE10.1 and TeeChart Pro VCL FMX Source Code 2017.20.
Thanks for your help
Anthony
I have some problems when i want to print (in pdf throught PDFCreator in attachement) a chart with a serie region using a pattern.
1- Pattern seems to be zoomed and streched when canvas size is changed before print. The rendering is really not acceptable
2- Contrary to old version (Delphi 9 & Teechat v8.08), filled area seems to be a picture and not vectorial. Besides, pdf file size is very larger!
I use Delphi XE10.1 and TeeChart Pro VCL FMX Source Code 2017.20.
Thanks for your help
Anthony
Re: SerieRegion with pattern - PDF export
Hello,
This is what I'm getting with a new simple example using RAD 10.2 Tokyo, TeeChart v2017.22 and PdfCreator 2.5: If you still find problems with it, please try to arrange a simple example project we can run as-is to reproduce the problem here.
Thanks in advance.
This is what I'm getting with a new simple example using RAD 10.2 Tokyo, TeeChart v2017.22 and PdfCreator 2.5: If you still find problems with it, please try to arrange a simple example project we can run as-is to reproduce the problem here.
Thanks in advance.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: SerieRegion with pattern - PDF export
I'm sorry, i forgot attachement in previous post...
Please find attached small project with serie region using pattern.
Pattern plotting is very important for me because it is representing geology.
Regards
Please find attached small project with serie region using pattern.
Pattern plotting is very important for me because it is representing geology.
Regards
- Attachments
-
- TestTChartSerieRegionPattern - XE10.1.zip
- (118.54 KiB) Downloaded 1102 times
Re: SerieRegion with pattern - PDF export
Hello,
Here it is a screenshot comparing the chart and the pdf your project generates for me with v2017.22:
I'm trying to compare the result with TeeChart v8 but I'm getting an "29100 - Internal GhostScript Error" with GDI and I get a blank pattern in GDIPlus.
Here it is a screenshot comparing the chart and the pdf your project generates for me with v2017.22:
I'm trying to compare the result with TeeChart v8 but I'm getting an "29100 - Internal GhostScript Error" with GDI and I get a blank pattern in GDIPlus.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: SerieRegion with pattern - PDF export
Hi,
"29100 - Internal GhostScript Error" from PDFCreator is one of some reasons i decided to update my RAD & Teechart version.
Effectivelly, I'm getting this error with certain pattern and not with other.
Please find attached, small project (D9 & Teechat v8.08) using working pattern:
As you can see, quality of pdf export is very well!
"29100 - Internal GhostScript Error" from PDFCreator is one of some reasons i decided to update my RAD & Teechart version.
Effectivelly, I'm getting this error with certain pattern and not with other.
Please find attached, small project (D9 & Teechat v8.08) using working pattern:
As you can see, quality of pdf export is very well!
- Attachments
-
- TestTChartSerieRegionPattern - D9.zip
- (51.03 KiB) Downloaded 1186 times
Re: SerieRegion with pattern - PDF export
Below same example as previous with Delphi XE10.1 & TeeChart 2017.10:
Pattern seems to be streched!
Any idea or workarround?
Anthony
Pattern seems to be streched!
Any idea or workarround?
Anthony
Re: SerieRegion with pattern - PDF export
Hello Anthony,
Any image pattern is likely to be stretched for a different output width/height ratio to the original Chart. I tried with a smaller image as brush pattern and note that it tiles so that may be a workaround. An alternative would be to use hatchstyle.
Regards,
Marc Meumann
Any image pattern is likely to be stretched for a different output width/height ratio to the original Chart. I tried with a smaller image as brush pattern and note that it tiles so that may be a workaround. An alternative would be to use hatchstyle.
Regards,
Marc Meumann
Steema Support
Re: SerieRegion with pattern - PDF export
Hi Marc!
HashStyle is not a good alternative for me, because user can choose its own geological pattern which is a bitmap.
To avoid stretch problem, i resize chart canvas to have exactly the same output width/height ratio (as you could have seen in my example). That's why I don't understand where the problem comes from! Besides, in previous TeeChart version, it works fine...
I really need to have this print feature working and so need your help.
Regards,
Anthony
HashStyle is not a good alternative for me, because user can choose its own geological pattern which is a bitmap.
To avoid stretch problem, i resize chart canvas to have exactly the same output width/height ratio (as you could have seen in my example). That's why I don't understand where the problem comes from! Besides, in previous TeeChart version, it works fine...
I really need to have this print feature working and so need your help.
Regards,
Anthony
Re: SerieRegion with pattern - PDF export
Hello Anthony,
I've restored the technique that was used in AssignBrush in previous versions. Could you please tell us if this test version gives you the expected result?
I've restored the technique that was used in AssignBrush in previous versions. Could you please tell us if this test version gives you the expected result?
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: SerieRegion with pattern - PDF export
Hi Yeray,
This is exactly what i want!
How can I restore "the technique that was used in AssignBrush in previous versions" in my side?
Thanks a lot for your help!!!
Anthony
This is exactly what i want!
How can I restore "the technique that was used in AssignBrush in previous versions" in my side?
Thanks a lot for your help!!!
Anthony
Re: SerieRegion with pattern - PDF export
Hello Anthony,
Since you have the sources, you can just open TeCanvas.pas, backup it, replace the TTeeCanvas.AssignBrush that matches the signature of the method below, and recompile.
Since you have the sources, you can just open TeCanvas.pas, backup it, replace the TTeeCanvas.AssignBrush that matches the signature of the method below, and recompile.
Code: Select all
Procedure TTeeCanvas.AssignBrush(const ABrush:TTeeBrush; AColor,ABackColor:TColor);
procedure SetBrushBitmap(ABitmap:{$IFDEF LCL}TCustomBitmap{$ELSE}TBitmap{$ENDIF});
begin
Brush.Bitmap{$IFDEF FMX}.Bitmap{$ENDIF}:=ABitmap;
{$IFNDEF FMX}
{$IFDEF TEEWINDOWS}
SetTextColor(Handle,ColorToRGB(AColor));
{$ENDIF}
{$ENDIF}
BackMode:=cbmOpaque;
BackColor:=ABackColor;
end;
var tmp: TBitmap;
begin
FBrush.OnChange:=nil;
if Assigned(ABrush.FImage) and Assigned(ABrush.FImage.Graphic)
{$IFDEF FMX}and (not ABrush.FImage.Graphic.IsEmpty) {$ENDIF} then
begin
Brush.Style:=bsClear;
if not (ABrush.FImage.Graphic is TBitmap) then
begin
{$IFDEF FMX}
tmp:=TBitmap.Create(ABrush.FImage.Width, ABrush.FImage.Height);
tmp.Canvas.DrawBitmap(ABrush.FImage, TRectF.Create(0,0,tmp.Width,tmp.Height),
TRectF.Create(0,0,tmp.Width, tmp.Height),
1);
{$ELSE}
tmp:=TBitmap.Create;
TeeSetBitmapSize(tmp,ABrush.FImage.Width,ABrush.FImage.Height);
tmp.Canvas.Draw(0,0,ABrush.FImage.Graphic);
{$ENDIF}
ABrush.FImage.Bitmap:=tmp;
tmp.Free;
end;
SetBrushBitmap(ABrush.FImage.Bitmap);
end
else
if Assigned(ABrush.Bitmap)
{$IFDEF FMX}and Assigned(ABrush.Bitmap.Bitmap) and (not ABrush.Bitmap.Bitmap.IsEmpty){$ENDIF}
{$IFDEF CLX}and (not ABrush.Bitmap.Empty){$ENDIF}
then
begin
Brush.Style:=bsClear;
SetBrushBitmap(ABrush.Bitmap{$IFDEF FMX}.Bitmap{$ENDIF});
end
else
begin
{$IFDEF FMX}
Brush.Assign(ABrush);
{$ELSE}
Brush.Bitmap:=nil;
{$ENDIF}
if Monochrome then
AColor:=clWhite;
FBrush.BackColor:=ABackColor;
FCanvas.Brush.Assign(ABrush); // <-- redundant for GDI+ etc
end;
if Assigned(ABrush.FGradient) then
Gradient.Assign(ABrush.Gradient)
else
Gradient.Visible:=False;
FBrush.OnChange:=ChangedBrush;
DoChangedBrush(FBrush);
end;
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: SerieRegion with pattern - PDF export
Hi Yeray,
Thank you a lot for your workarround, it is working very well!!!
Is it planned to fix this issue in futur release?
Again, thank you for your excellent support!
Anthony
Thank you a lot for your workarround, it is working very well!!!
Is it planned to fix this issue in futur release?
Again, thank you for your excellent support!
Anthony