rendering

How do I get the CSS fonts to work with this Grails PDF rendering plug-in?

两盒软妹~` 提交于 2019-12-12 18:07:38
问题 I am using a Grails rendering plugin to generate PDF. I want to include CSS with my PDF to render it nicely. I found an example on the rendering plugin website I put the CSS below in print media so that it works for PDF, but this does not work for me. I also do not know how to change the font from Arial to another font. Can someone explain this to me? The plugin uses Arial font with this CSS: @font-face { src: url(path/to/arial.ttf); -fs-pdf-font-embed: embed; -fs-pdf-font-encoding: cp1250; }

Image Rendering Test

不打扰是莪最后的温柔 提交于 2019-12-12 17:19:04
问题 I am benchmarking a custom brower and want to benchmark the rendering speeds of different types of images (gif, jpg, png) of the same file size to see which of the image formats this browser renders the fastest. My process was just to have a simple seperate HTML page for each type of image and just use a Javascript counter before it is rendered and and after to measure the browser's rendering speed of that specific image. Any thoughts on this process? Any thoughts on how to improve it? 回答1:

Swing Font Rendering

喜夏-厌秋 提交于 2019-12-12 16:24:53
问题 I am developing a Java swing Application with a Synth look and feel. The application has a background image that contains some text, and I need some 'active' text (text in a JLabel) above this background layer. However, the font I have chosen (Verdana), renders terribly in Swing for some reason, and as such, the font of the active text does not match the font of the background. Does anyone know of a way to make the text a little smoother-looking in Swing? I have found similar problems here

How to use jPCT with Vuforia SDK?

冷暖自知 提交于 2019-12-12 16:23:42
问题 Can someone give an overview of mixing Jpct and Qualcomm Vuforia SDK? Is it a good idea to use Java rendering engine with Vuforia? 回答1: Basically, the whole roll of QCAR is to compute the transformation matrix of a deformed predefined target image. It gives you two important 4x4 matrices which you can use with OpenGL to superimpose your graphics. ModelView matrix Projection matrix if you are familiar with OpenGL, these two are enough for rendering purpose. But if you want to use a rendering

WPF PathGeometry rendering

烈酒焚心 提交于 2019-12-12 15:18:23
问题 I have a PathGeometry containg a single polyline, and at a fixed interval I add a new point to the line (to plot a waveform). When using the Perforator tool I can see that every time I add a point to the line, WPF marks the entire PathGeometry as 'dirty', causing the entire shape to be re-rendered. I hoped it would only redraw the single pixel. Is there any way to accomplish that? 回答1: The short answer is No.. WPF is correct in dirtying the entire geometry upon a change as it take into

How to set orthographic near/far clipping planes to display all vertices

青春壹個敷衍的年華 提交于 2019-12-12 15:14:55
问题 I am rendering scenes using a glm::ortho projection. I want the rendering to include every vertex I draw without adding unnecessary depth (i.e. with minimal depth buffer resolution impact). I've seen this post for a similar question on perspective projections, but I am looking for both near and far clipping plane values in an orthographic projection. I can calculate the z values of each vertex using the viewMatrix to transform the vertices into screen coordinates. In pseudo code: float near;

Rendering rounded corners for imageView on Android

我与影子孤独终老i 提交于 2019-12-12 12:31:50
问题 I have the following piece of code for rendering an imageView with rounded corners. public class RoundedCornerImageView extends ImageView { private int rounded; public RoundedCornerImageView(Context context) { super(context); } public RoundedCornerImageView(Context context, AttributeSet attrs) { super(context, attrs); } public RoundedCornerImageView(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); } public int getRounded() { return rounded; } public void

Why WPF renders differently on different versions of Windows?

雨燕双飞 提交于 2019-12-12 11:13:06
问题 I read that WPF uses DirectX under the hood to perform its rendering, that it doesn't rely on the dinosaurian libraries that WinForms uses to render controls. So I made my Presentation layer with WPF and it looks the way it should under Win8. Then I deployed the project to Windows Server 2003... to find out that my nice little custom message box looks awfully WinForms-like and somewhat clunky; the button controls are VERY similar to the WinForms ones, the expander control is no longer shown

Saving “heavy” figure to PDF in MATLAB - rendering problem

霸气de小男生 提交于 2019-12-12 11:02:14
问题 I generate a figure in MATLAB with large amount of elements (100000+) and want to save it into a PDF file. With zbuffer or painters renderer I've got very large and slowly opened file (over 4 Mb) - all points are in vector format. Using OpenGL renderer rasterize the figure in PDF, ok for the plot, but not good for text labels. The file size is about 150 Kb. Try this simplified code, for example: x=linspace(1,10,100000); y=sin(x)+randn(size(x)); plot(x,y,'.') set(gcf,'Renderer','zbuffer')

React Native View Render

僤鯓⒐⒋嵵緔 提交于 2019-12-12 10:50:13
问题 how can I render views conditionally? Example: if my app has not connected to internet - render error view, if connected - render WebView? Does that possible with react native? I want to render not pure html 回答1: Logic to render views conditionally, using your example: render() { if (!this.state.isConnected) { // error return ( <View></View> ); } else { return ( // webview <WebView /> ); } } 回答2: In your render method , you can define conditionals like the example below. For instance, you may