-
Bug
-
Resolution: Not an Issue
-
P3
-
None
-
8u152
-
x86
-
other
FULL PRODUCT VERSION :
ADDITIONAL OS VERSION INFORMATION :
Windows
A DESCRIPTION OF THE PROBLEM :
Hi,
I started an application for drawing some diagrams.
I draw it on a virtual Canvas with two scrollbars, so the diagram can be much larger then presented.
My issues are with printing: I would like to print the Canvas in the best resolution possible.
If I try to print the canvas without adding it to any Scene at all, printing does not work.
I add it to a pane and then print, but the printed output is not the quality I expect ( is blurry ).
Now may I increase the print resolution ? How may I print a canvas even if is not showing on screen ?
Few more ideas you may consider:
1. If I work on two monitors, ( primary is a notebook with an attached monitor ), the canvas looks good on the notebook, but the quality is not so fine on the attached monitor with higher resolution. At least for text the aliasing is not the best. Is something I can do ?
2. Just a point for getting more programmers on JavaFx: re-write documentation using lambadas. For me it was hard at first to read the tutorials without lambadas. Now I got used with them and is much easier. Using old fasion code in tutorials will 'scare' many new users.
REGRESSION. Last worked in version 8u151
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
final PageLayout pageLayout = printerJob.getJobSettings().getPageLayout();
final Canvas canvas = new Canvas(pageLayout.getPrintableWidth(), pageLayout.getPrintableHeight());
GraphicsContext gr = canvas.getGraphicsContext2D();
gr.setFill( Color.BLACK );
gr.strokeRect( 0,0,pageLayout.getPrintableWidth()-1, pageLayout.getPrintableHeight()-1);
gr.fillText( "Sample text", 20, 20 );
gr.setStroke( Color.BLACK );
gr.strokeLine( 30, 30, pageLayout.getPrintableWidth(), pageLayout.getPrintableHeight() );
// WITHOUT THIS NEXT LINE PRINTING DOES NOT WORK AT ALL
previewPanel.setCenter( canvas );
printerJob.printPage( pageLayout, canvas );
printerJob.endJob();
REPRODUCIBILITY :
This bug can be reproduced always.
ADDITIONAL OS VERSION INFORMATION :
Windows
A DESCRIPTION OF THE PROBLEM :
Hi,
I started an application for drawing some diagrams.
I draw it on a virtual Canvas with two scrollbars, so the diagram can be much larger then presented.
My issues are with printing: I would like to print the Canvas in the best resolution possible.
If I try to print the canvas without adding it to any Scene at all, printing does not work.
I add it to a pane and then print, but the printed output is not the quality I expect ( is blurry ).
Now may I increase the print resolution ? How may I print a canvas even if is not showing on screen ?
Few more ideas you may consider:
1. If I work on two monitors, ( primary is a notebook with an attached monitor ), the canvas looks good on the notebook, but the quality is not so fine on the attached monitor with higher resolution. At least for text the aliasing is not the best. Is something I can do ?
2. Just a point for getting more programmers on JavaFx: re-write documentation using lambadas. For me it was hard at first to read the tutorials without lambadas. Now I got used with them and is much easier. Using old fasion code in tutorials will 'scare' many new users.
REGRESSION. Last worked in version 8u151
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
final PageLayout pageLayout = printerJob.getJobSettings().getPageLayout();
final Canvas canvas = new Canvas(pageLayout.getPrintableWidth(), pageLayout.getPrintableHeight());
GraphicsContext gr = canvas.getGraphicsContext2D();
gr.setFill( Color.BLACK );
gr.strokeRect( 0,0,pageLayout.getPrintableWidth()-1, pageLayout.getPrintableHeight()-1);
gr.fillText( "Sample text", 20, 20 );
gr.setStroke( Color.BLACK );
gr.strokeLine( 30, 30, pageLayout.getPrintableWidth(), pageLayout.getPrintableHeight() );
// WITHOUT THIS NEXT LINE PRINTING DOES NOT WORK AT ALL
previewPanel.setCenter( canvas );
printerJob.printPage( pageLayout, canvas );
printerJob.endJob();
REPRODUCIBILITY :
This bug can be reproduced always.