getImageMode() never called!
getImageMode() never called!
So how would you get a tiled/centered image on the panel/wall?
Re: getImageMode() never called!
Hi Kristoffer,
.
However, I'm afraid the TILE and STRETCH modes aren't implemented yet. I've added it to the wish list to be implemented in next releases (TJ71016548).
It's a public function you can use to check the value of the imageMode property. Internally, it is directly used the imageMode property in thegetImageMode() never called!
Code: Select all
chartEvent
Here you have an example of how to use the CENTER mode:znakeeye wrote:So how would you get a tiled/centered image on the panel/wall?
Code: Select all
private void initializeChart() {
tChart1.getAspect().setView3D(false);
tChart1.getLegend().setVisible(false);
Bar bar1 = new Bar(tChart1.getChart());
bar1.fillSampleValues();
checkExternalStorage();
Image im = null;
if (mExternalStorageAvailable) {
if (mExternalStorageWriteable) {
final File ExtPath = new File(Environment.getExternalStorageDirectory().getAbsolutePath() + File.separator + "Download");
ExtPath.mkdirs();
String path = ExtPath.getAbsolutePath() + File.separator + "flower.jpg";
im = new Image(path);
}
}
ChartImage chIm = new ChartImage(tChart1.getChart());
chIm.setImage(im);
chIm.setImageMode(ImageMode.TILE);
//chIm.setImageMode(ImageMode.CENTER);
}
private boolean mExternalStorageAvailable = false;
private boolean mExternalStorageWriteable = false;
private void checkExternalStorage() {
final String state = Environment.getExternalStorageState();
if (Environment.MEDIA_MOUNTED.equals(state) || Environment.MEDIA_SHARED.equals(state)) {
// We can read and write the media
mExternalStorageAvailable = mExternalStorageWriteable = true;
} else if (Environment.MEDIA_MOUNTED_READ_ONLY.equals(state)) {
// We can only read the media
mExternalStorageAvailable = true;
mExternalStorageWriteable = false;
} else {
// Something else is wrong. It may be one of many other states, but
// all we need
// to know is we can neither read nor write
mExternalStorageAvailable = mExternalStorageWriteable = false;
}
}
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |