renderer

Plotting issues with dash-dot and dotted lines: How to modify default linestyles for better use with vector renderer 'painters'?

北城以北 提交于 2019-12-03 16:25:27
Matlab offers the following default linestyles : '-' Solid line (default) '--' Dashed line ':' Dotted line '-.' Dash-dot line The first two are alright, the third : is absolutely not my taste and rendered badly and the last one -. is just usable with pixel renderers ( openGL , zbuffer ), otherwise it looks the same as -- . But I'd like to render my graphs with painters for countless reasons. This way the dash-dot line becomes useless: The dash-dot lines (blue, bright red) practically look the same like the dashed line (dark red). This is a 3000% zoom of my vector-graphic based PDF. This is

LaTeX renderer for .NET?

牧云@^-^@ 提交于 2019-12-03 16:14:22
问题 I'm curious as to whether a native .NET renderer for TeX/LaTeX exists. The closest match I have been able to find is a Java implementation, JMathTeX. I am tempted to port this to C#, but before I do so, I would simply like to check whether anyone is aware of a .NET implementation out there. My current thoughts are to use MiKTeX along with dvipng to compile the TeX source and render the generated DVI as a PNG, but I'm still worrying this may incur an unacceptable amount of overhead, not to

Rails3: How to pass param into custom will_paginate renderer?

我们两清 提交于 2019-12-03 11:13:49
I've got a custom will_paginate renderer that overrides WillPaginate::ViewHelpers::LinkRenderer's link method like so: def link(text, target, attributes = {}) "<a href='/users/95/friends_widget?page=#{target}' rel='next' data-remote='true'>#{text}</a>" end ...and that works great, except you can see the hard-coded 95 in that link. How would I pass a parameter (e.g. user or user's ID) into the custom renderer via the Rails view? <%= will_paginate(@user_friends, :remote => true, :renderer => FriendsRenderer) %> Or is there something I'm missing, some easier way to do it? BTW: @user_friends isn't

JTable, custom header renderer and sorting icons

无人久伴 提交于 2019-12-03 07:32:13
While setting a custom renderer on a JTable header I get the expected visual behavior (borders, font, alignment, ...) but I can't manage to get the LaF sorting icons that usually appear when the rows are sorted. This is the code for setting the custom header renderer: Enumeration<TableColumn> columns = getColumnModel().getColumns(); while (columns.hasMoreElements()) columns.nextElement().setHeaderRenderer(new XDeliveryTableHeaderRenderer()); This is an excerpt of the custom header renderer: public class MyTableHeaderRenderer extends JLabel implements TableCellRenderer { private static final

JavaFX 8 QuantumRenderer high CPU usage

南楼画角 提交于 2019-12-03 04:51:44
I have a JavaFX APP containing two listviews displaying incoming customer orders (using a custom cellfactory) received from my server. I also have a few tableview displaying information from a Postgres database (this are spread across a few tabs inside a tabpane). The user has to take an order (by clicking on it), and enter a few information inside textboxes. The application was initially written an deployed using Java7. I had no problem whatsoever. But recently I decided to switch to Java8. I modified my code to use lambdas and added a few extras stuff to the app: a timeline to check and

How to Highlight row table if given a condition?

百般思念 提交于 2019-12-02 13:21:56
问题 I have a jtable which is consists of columns : C No, Borrower, Market, Loan, Start, Daily, Expiry how can i highlight the table row if the current date is 5 days away from the date inside the column 'expiry' ? SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); Calendar cal = Calendar.getInstance(); String expDateString = sdf.format(cal.getTime()).toString(); System.out.println(expDateString); String nana = tableSummary.getModel().getValueAt(row, 6).toString(); System.out.println(nana)

Switch between ColumnDocumentRenderer and DocumentRenderer in same page?

霸气de小男生 提交于 2019-12-02 09:22:27
问题 I was testing few things with iText7 and I have a scenario where I need to have DocumentRenderer paragraph at the top and then start the ColumnDocumentRender with 2 columns right below it on the same page. The problem I am having is when I change the content on same page it overlaps content from DocumentRenderer with content from ColumnDocumentRenderer. I believe it is because one render does not know about the other render and contents starts from the top of the page. I followed this

Engine Rendering pipeline : Making shaders generic

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-02 08:08:57
问题 I am trying to make a 2D game engine using OpenGL ES 2.0 (iOS for now). I've written Application layer in Objective C and a separate self contained RendererGLES20 in C++. No GL specific call is made outside the renderer. It is working perfectly. But I have some design issues when using shaders. Each shader has its own unique attributes and uniforms that need to be set just before the main draw call (glDrawArrays in this case). For instance, in order to draw some geometry I would do: void

Engine Rendering pipeline : Making shaders generic

我是研究僧i 提交于 2019-12-02 06:43:46
I am trying to make a 2D game engine using OpenGL ES 2.0 (iOS for now). I've written Application layer in Objective C and a separate self contained RendererGLES20 in C++. No GL specific call is made outside the renderer. It is working perfectly. But I have some design issues when using shaders. Each shader has its own unique attributes and uniforms that need to be set just before the main draw call (glDrawArrays in this case). For instance, in order to draw some geometry I would do: void RendererGLES20::render(Model * model) { // Set a bunch of uniforms glUniformMatrix4fv(.......); // Enable

How to set transparent background for JTree cell?

元气小坏坏 提交于 2019-12-02 06:39:12
问题 Folks, I am trying to create a gradient JTree control. The following code mostly works except that the background for the tree cell is not transparent. I would appreciate it if someone call tell me what is it that I am not doing right. Thank you in advance for your help. Regards, Peter package TestPackage; import javax.swing.*; import javax.swing.tree.DefaultMutableTreeNode; import javax.swing.tree.DefaultTreeCellRenderer; import java.awt.*; public class Test { public Test() { JFrame frame =