- edited description
Pixel resizing/ rescaling in matrix causes drawing issues
The graphical matrix that represents the data is drawn in rectangles. The width and height of these rectangles is determined by the user, for example by using the resizing buttons in DendroView. The scale is also dependent on the width/ height available in the GlobalView container, because that is the container in which the matrix is drawn.
As per the matrix drawing implementation in the original Java TreeView, only full rectangles can be displayed (not half etc.). When the scale of either width or height of all rectangles in a row or column is miscalculated in the MapContainer class (usually 'xmap' for rows, 'ymap' for columns) , a white-space will occur in the drawing. The yellow selection rectangles subsequently appear shifted.
Relevant classes:
- DendroView
- GlobalView
- MapContainer
- ArryDrawer/ DoubleArryDrawer
- DendroViewController
Comments (8)
-
reporter -
Issue
#4was marked as a duplicate of this issue. -
I was testing a bit today and discovered a bit more to this issue. In addition to the blank column, there are 2 other associated erroneous behaviors. I made a screen recording of this test. It's a very large file, as I recorded a whole session, but hopefully you won't need to view it. I'll paste a link to it off of my desktop's web server:
http://gen-rlimac.princeton.edu/~rleach/TREEVIEWBUGS/multiple_bugs/multiple_bugs.mov
The following items refer to time indexes 1:05-1:10:
- In addition to the last column being completely blank, also: the second to last column (Car1p/Arg...) is missing its column name
- The column labels get progressively out of alignment with the spots until they start appearing to label the wrong column about half-way in.
Rob
-
reporter Yep. If you actually resize the matrix and the error happens, then there's a log message printed which I was trying to use for debugging. The main issues in the code must lie in MapContainer (mostly setScale(), zoomScale() called DendroController) and related classes, possibly also GlobalView.
What basically happens is that the method to calculate the scale of the matrix elements miscalculates the correct scale that would fit onto the current screen. There are variables called usedPixels and availablePixels that play a role in this behavior. Furthermore, there is a dependency on the number of elements to display on screen, which determines element size because you always want to fill all the available pixels from GlobalView.
I think the error shows itself, when the usedPixels are not equal to availablePixels.. Th difference ends up being that white space. Then the other classes dealing with labels and tree alignment get misinformed and display weird stuff.
I hope that helps a bit.
-
Issue
#11was marked as a duplicate of this issue. -
-
assigned issue to
-
assigned issue to
-
- changed status to resolved
This was a precision issue with a double value that is passed around as a "scale" factor. Sometimes, the value ended in .99999999... and casting as an int was reducing the value instead of bumping it up. So I implemented a way to do the bump up if the value was within a precision threshold, arbitrarily set at 0.000001.
-
reporter - changed status to closed
- Log in to comment