Jump to content
Changes to the Jaspersoft community edition download ×

Something about lines being 1 pixel shorter?


2005 IR Help

Recommended Posts

By: David Lim - aberrant80

Something about lines being 1 pixel shorter?

2004-03-16 02:39

I remember something being said about lines being drawn shorter than other elements in the group; which resulted in the disjointed border in the stretch sample. Am I right?

 

Has anyone gotten a workaround? As mentioned in another thread, I need a border around the entire table body, so I can't just use a rectangle. I created 2 vertical lines in the detail band grouped with the text field. The table headers have their own borders. The column footer band has a horizontal line.

 

The problem is that the bottom line is not joined to the lines that represent the sides of the table.

 

 

 

 

By: Chuck Deal - cdeal

RE: Something about lines being 1 pixel shorter?

2004-03-16 06:10

set the y value = -1, this should fix the problem

 

 

 

 

By: David Lim - aberrant80

RE: Something about lines being 1 pixel short

2004-03-16 18:19

Actually... it didn't. Maybe that would've worked in the xml file but I don't use the xml file. Doing line.setHeight(-1) for the lines at the side of each field (all 3 in a group) somehow managed to cause the field to disappear entirely, leaving only the lines (still separated).

 

 

 

 

By: Teodor Danciu - teodord

RE: Something about lines being 1 pixel short

2004-03-17 00:48

 

Hi,

 

These gaps occur only when the line is thin

(pen="Thin").

This is because in this case the line is half a pixel

thick and half a pixel shorter at both ends, leaving

us with a on pixel gap between two lines.

 

If you put the line at y=-1, make sure you also add

one pixel to its height. This way the lines will overlap

one pixel giving you continuity.

However, this trick is bad news for HTML and XLS

formats where overlapping elemets are ignored.

This is probably what happend with you text elements

if placing the line at -1 would actualy make it

overlap with some text fields in the above band.

I have to see you design to make other suggestions.

 

I hope this helps.

Teodor

 

 

 

 

 

 

By: David Lim - aberrant80

RE: Something about lines being 1 pixel short

2004-03-17 01:16

I don't have an xml design. And basically, I don't have a height. And since I need probably need to do XLS and HTML in the future, overlap probably isn't an option.

 

Right now, I'm actually creating line elements of 0 height and setting the stretch to relative tallest object attribute. I create 2 such line elements and put them in the same group as the textfield, counting on the textfield to stretch itself and stretch the 2 lines together. Any workaround so far?

 

I'll have to put in offset x and y later, so that may help alleviate this problem when I put in all the calculations for offset of the borders. It just doesn't look very nice right now...

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...