File tree Expand file tree Collapse file tree
library/src/main/java/com/gigamole/slideimageview/lib Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -131,21 +131,25 @@ private void createSource() {
131131 this .horizontalDirection = HorizontalDirection .LEFT_TO_RIGHT ;
132132 this .verticalDirection = VerticalDirection .TOP_TO_BOTTOM ;
133133
134+ if (this .rate > 0 ) {
135+ this .rate = this .rate * (-1 );
136+ }
137+
134138 if (this .bitmap != null ) {
135139 if (this .axis == Axis .HORIZONTAL ) {
136140 this .bitmap = Bitmap .createScaledBitmap (
137141 this .bitmap ,
138142 this .height * this .bitmap .getWidth () / this .bitmap .getHeight (),
139143 this .height ,
140144 false );
141- this .slideSize = (this .bitmap .getWidth () - this .width ) * - 1 ;
145+ this .slideSize = (this .bitmap .getWidth () - this .width ) * (- 1 ) ;
142146 } else {
143147 this .bitmap = Bitmap .createScaledBitmap (
144148 this .bitmap ,
145149 this .width ,
146150 this .width * this .bitmap .getHeight () / this .bitmap .getWidth (),
147151 false );
148- this .slideSize = (this .bitmap .getHeight () - this .height ) * - 1 ;
152+ this .slideSize = (this .bitmap .getHeight () - this .height ) * (- 1 ) ;
149153 }
150154 } else {
151155 this .bitmap = Bitmap .createBitmap (this .width , this .height , Bitmap .Config .ARGB_8888 );
You can’t perform that action at this time.
0 commit comments