Join a rectangle annotation with another annotation in JFreeChart? - jfreechart

I have used XYAnnotation and drawn a rectangle in xylinechart. Now how can I join it with another rectangle annonation?

One way would be to use an XYLineAnnotation
plot.addAnnotation(new XYBoxAnnotation( 0.5,0.5,1.5,1.5));
plot.addAnnotation(new XYBoxAnnotation( 4.5,3.5,5.5,4.5));
plot.addAnnotation(new XYLineAnnotation( 1.5,1.5,4.5,3.5));

Related

JFreeChart, JRChartCustomizer, drawing a overlaying rectangle [duplicate]

I have used XYAnnotation and drawn a rectangle in xylinechart. Now how can I join it with another rectangle annonation?
One way would be to use an XYLineAnnotation
plot.addAnnotation(new XYBoxAnnotation( 0.5,0.5,1.5,1.5));
plot.addAnnotation(new XYBoxAnnotation( 4.5,3.5,5.5,4.5));
plot.addAnnotation(new XYLineAnnotation( 1.5,1.5,4.5,3.5));

Why does RDLC table inner border thicker than outer border

I am working with WPF RDLC with a table that will display my record ,i was wondering why the inner border is more thicker compare to the outer border
Following is one of the example
All border I set to 1pt , but the outer look like 1pt , the inner look like 2pt
Is that anyway for me to set it all to border same width ?
Can you try:
selecting the table itself (not the collection of cells in the
table) and then set the table's border.
resize the table so it doesn't touch the report edge.
I have found the problem and solution .
The problem is because each cell is set to 1pt width for the border , therefore a column consist more than a cell side by side , the border will look thicker .
To solve this borders that look thinker require to reduce the border width to 0.5 , so that when both cell side by side , the total border width will be 1pt
Another possible solution if you have already checked border width.
It is possible if the inside columns and rows border style is solid but the entire table (select the corner) border style is none. Change it so that they are the same.

How can I draw this shape in XAML?

I would like to draw a shape that looks exactly like this, with the same gradient fill:
using only XAML.
The radius of the inner circle needs to be configurable.
The radius of the outer circle needs to be configurable.
The width of the gap at the top needs to be configurable.
The white color needs to be transparent.
What is the best way of achieving this?

How can I take the intersection of two geometries in Silverlight?

Is there a way to take the intersection of two geometries in Silverlight (4.0)?
Background: in order to implement clipping, we need to take the current clipping area (a geometry) and intersect that with a new area in order to obtain the new clipping area.
We actually have a solution for this, but it seems awkward, or at least sub-optimal: we draw inside a canvas with its own clipping area, and whenever we need the intersection of a new clipping area, we create a new canvas with its own clipping area, and place that in the old one. We can then start drawing objects in the new canvas, and they will be correctly clipped against both.
I think you can use "Composite geometries", check this link to find how to create composite geometries.
W.r.t. the answer of Andris: unfortunately, using composite geometries does not appear to be sufficient. A GeometryGroup creates a union of shapes. To my knowledge there is no way to specify an intersection.
Note also that the fill rules are too limited to specify an intersection.

Is there a MergedGradientBrush in wpf?

Suppose I had two brushes.
One that was a linear gradient brush that was from Dark to light
One was a radial brush that went from Dark to light.
How could I merge the brushes so that when I apply them, I can apply both at once.
EG Check this:
1) http://www.codeproject.com/KB/vista/WindowsVistaRenderer/VistaRenderer4.gif
2) http://www.codeproject.com/KB/vista/WindowsVistaRenderer/VistaRenderer5.gif
How could I (In WPF/XAML) merge both into one gradient and then refer to that?
(This is Mr. Menendez's Images from Codeproject)
Short answer, there is no way to "merge" two different gradient brushes into one. However, there are workarounds that will get the job done for you. You could, for example, create two overlaid Border elements (using a Grid), one with the linear brush and the other with the gradient brush. You could then set the alpha component of each of the colors in the brushes to 50% transparency. In that manner, the brushes would be rendered one on top of the other, but both would show up equally well.

Resources