Commit a603373e by german

Picto updated

parent 0d8ed678
......@@ -54,9 +54,7 @@ public class Picto extends Img {
public static String PCB_STATUS_MODIFICATION="pcb_status_modification";
public static String EXPRESSION = "expression";
public static String MIRROR = "mirror";
/**Modificacion German*/
public static String LEGEND="legend";
public static String LEGEND = "legend";
}
......@@ -425,14 +423,14 @@ public class Picto extends Img {
Log.i("TAG_NUEVO","ancho: "+width);
Log.i("TAG_NUEVO","alto: "+height);
Log.i("TAG_NUEVO","densidad: "+dens);
//if(!get_legend().equals(JSON_ATTTR_LEGEND_VALUES.NONE)){ //Si tiene leyenda
if(!get_legend().equals(JSON_ATTTR_LEGEND_VALUES.NONE)){
String texto = this.translation.toUpperCase();
String[] words = texto.split(" ");
StringBuffer txt = new StringBuffer();
if (words.length == 1) {//Si solo hay una palabra
if (words[0].length() > 10) { //Si es mayor de 10 caracteres
if (words.length == 1) {
if (words[0].length() > 10) {
texto = "";
int mitad = (words[0].length() / 2) - 1;
......@@ -466,7 +464,8 @@ public class Picto extends Img {
}
}
//if(get_legend().equals(JSON_ATTTR_LEGEND_VALUES.NORMAL)) {
if(get_legend().equals(JSON_ATTTR_LEGEND_VALUES.NORMAL)) { //Normal legend
android.graphics.Bitmap.Config bitmapConfig = bitmap.getConfig();
if (bitmapConfig == null) {
bitmapConfig = android.graphics.Bitmap.Config.ARGB_8888;
......@@ -476,7 +475,6 @@ public class Picto extends Img {
Canvas canvas = new Canvas(bitmap);
if(cont == 0) {
//Copiar el bitmap a uno nuevo y reescalar
Bitmap bm = Bitmap.createScaledBitmap(bitmap, width / 2, height / 2, false);
canvas.drawColor(Color.TRANSPARENT, PorterDuff.Mode.CLEAR); //Poner en blanco el bitmap original para dibujar encima
canvas.drawBitmap(bm, 25, 0, paint);
......@@ -498,10 +496,9 @@ public class Picto extends Img {
}
//}else{
//Solo texto
/*android.graphics.Bitmap.Config bitmapConfig = bitmap.getConfig();
}else{
//Only legend
android.graphics.Bitmap.Config bitmapConfig = bitmap.getConfig();
if (bitmapConfig == null) {
bitmapConfig = android.graphics.Bitmap.Config.ARGB_8888;
}
......@@ -529,7 +526,7 @@ public class Picto extends Img {
canvas.drawBitmap(textView.getDrawingCache(), 0, 25, null);
}
}*/
}
return bitmap;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment