pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roger Whitcomb <Roger.Whitc...@actian.com>
Subject RE:
Date Tue, 01 Dec 2015 00:34:56 GMT
I have just now committed a small example of how to use a ScaleDecorator to zoom in and out
of an image.  Hope this will help.

In “trunk”:
Adding         demos\src\org\apache\pivot\demos\decorator\ScaleDecoratorDemo.java
Adding         demos\src\org\apache\pivot\demos\decorator\scale_window.bxml
Transmitting file data ..
Committed revision 1717360.

In “branches/2.0.x”:
Sending        .
Adding         demos\src\org\apache\pivot\demos\decorator\ScaleDecoratorDemo.java
Adding         demos\src\org\apache\pivot\demos\decorator\scale_window.bxml

Committed revision 1717363.

~Roger

From: Roger Whitcomb
Sent: Monday, November 30, 2015 3:21 PM
To: user@pivot.apache.org
Subject: RE:

Hi Josh,
                Welcome to Pivot!  Have you looked at using a ScaleDecorator on your ImageView?
 This may work better than adjusting the Border size.  And it has settings for the alignment
(left/center/right) of the scaled image as well.  I might be able, in a couple of days, to
try to implement a small example.  Sorry there isn’t one already in the examples part of
the code….

Let us know,
~Roger Whitcomb

From: Josh Highley [mailto:joshhighley@gmail.com]
Sent: Monday, November 30, 2015 2:08 PM
To: user@pivot.apache.org<mailto:user@pivot.apache.org>
Subject:

I need help getting an image to display centered inside a larger ScrollPane.  My application
displays an image that can be zoomed in and out.  A snippet of my current bxml is below. 
I adjust the zoom by changing the dimensions of the Border container.  When the border is
zoomed out such that it is smaller than the ScrollPane size, it's aligning to the top-left.
 I'd like to center it vertically and horizontally.  I've tried various combinations of TablePane,
FillPane and BoxPane as parents of the Border. BoxPane with fill:true (maybe nested BoxPanes
with opposite orientations) isn't expanding to fill the ScrollPane as I'd expect; It shrinks
to the size of the Border/Image

<ScrollPane>
   <Border>
      <ImageView styles="{fill: true}"/>
   </Border>
</ScrollPane>

Thanks,

Josh
Mime
View raw message