[DEV] android is back
Update header licence of the java files Update font search Corection of the dimention system ==> might be tested again
This commit is contained in:
parent
d92b24b89d
commit
3b23c15a91
2
build
2
build
@ -1 +1 @@
|
||||
Subproject commit 3cfc489b02d62600898973b1a4a29543fc8a691a
|
||||
Subproject commit 8478e412ae1d3a80c463f5f4bec7f9b846be33ef
|
2
external/etk
vendored
2
external/etk
vendored
@ -1 +1 @@
|
||||
Subproject commit c7ece69d4e1018107b4d6c0b5f99764e06df0827
|
||||
Subproject commit 61bd6002d03ac065c40ac581661495fe9e237706
|
@ -1,34 +0,0 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file __PROJECT_NAME__.java
|
||||
* @brief Java __PROJECT_NAME__ code.
|
||||
* @author Edouard DUPIN, Kevin BILLONNEAU
|
||||
* @date 11/07/2012
|
||||
* @par Project
|
||||
* ewol
|
||||
*
|
||||
* @par Copyright
|
||||
* Copyright 2011 Edouard DUPIN, all right reserved
|
||||
*
|
||||
* This software is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY.
|
||||
*
|
||||
* Licence summary :
|
||||
* You can modify and redistribute the sources code and binaries.
|
||||
* You can send me the bug-fix
|
||||
*
|
||||
* Term of the licence in in the file licence.txt.
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
package __PROJECT_ORG_TYPE__.__PROJECT_VENDOR__.__PROJECT_PACKAGE__;
|
||||
|
||||
import org.ewol.EwolActivity;
|
||||
|
||||
public class __PROJECT_NAME__ extends EwolActivity {
|
||||
public void onCreate(android.os.Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
initApkPath("__PROJECT_ORG_TYPE__", "__PROJECT_VENDOR__", "__PROJECT_PACKAGE__");
|
||||
}
|
||||
}
|
@ -1,26 +1,10 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file Ewol.java
|
||||
* @brief Java interface to the CPP code.
|
||||
* @author Edouard DUPIN, Kevin BILLONNEAU
|
||||
* @date 20/04/2012
|
||||
* @par Project
|
||||
* ewol
|
||||
*
|
||||
* @par Copyright
|
||||
* Copyright 2011 Edouard DUPIN, all right reserved
|
||||
*
|
||||
* This software is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY.
|
||||
*
|
||||
* Licence summary :
|
||||
* You can modify and redistribute the sources code and binaries.
|
||||
* You can send me the bug-fix
|
||||
*
|
||||
* Term of the licence in in the file licence.txt.
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
* @author Edouard DUPIN, Kevin BILLONNEAU
|
||||
*
|
||||
* @copyright 2011, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license BSD v3 (see license file)
|
||||
*/
|
||||
|
||||
package org.ewol;
|
||||
|
||||
|
@ -1,26 +1,10 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file EwolActivity.java
|
||||
* @brief Java EwolActivity code.
|
||||
* @author Edouard DUPIN, Kevin BILLONNEAU
|
||||
* @date 20/04/2012
|
||||
* @par Project
|
||||
* ewol
|
||||
*
|
||||
* @par Copyright
|
||||
* Copyright 2011 Edouard DUPIN, all right reserved
|
||||
*
|
||||
* This software is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY.
|
||||
*
|
||||
* Licence summary :
|
||||
* You can modify and redistribute the sources code and binaries.
|
||||
* You can send me the bug-fix
|
||||
*
|
||||
* Term of the licence in in the file licence.txt.
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
* @author Edouard DUPIN, Kevin BILLONNEAU
|
||||
*
|
||||
* @copyright 2011, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license BSD v3 (see license file)
|
||||
*/
|
||||
|
||||
|
||||
package org.ewol;
|
||||
@ -105,9 +89,6 @@ public abstract class EwolActivity extends Activity implements EwolCallback, Ewo
|
||||
//packageManager.checkPermission("android.permission.READ_SMS", myPackage) == PERMISSION_GRANTED;
|
||||
//Ewol.paramSetArchiveDir(3, getExternalCacheDir().toString());
|
||||
|
||||
// return apk file path (or null on error)
|
||||
//initApkPath("__PROJECT_ORG_TYPE__", "__PROJECT_VENDOR__", "__PROJECT_PACKAGE__");
|
||||
|
||||
DisplayMetrics metrics = new DisplayMetrics();
|
||||
getWindowManager().getDefaultDisplay().getMetrics(metrics);
|
||||
EWOL.displayPropertyMetrics(metrics.xdpi, metrics.ydpi);
|
||||
|
@ -1,26 +1,10 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file EwolAudioTask.java
|
||||
* @brief Java Audio interface code.
|
||||
* @author Edouard DUPIN, Kevin BILLONNEAU
|
||||
* @date 29/06/2012
|
||||
* @par Project
|
||||
* ewol
|
||||
*
|
||||
* @par Copyright
|
||||
* Copyright 2011 Edouard DUPIN, all right reserved
|
||||
*
|
||||
* This software is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY.
|
||||
*
|
||||
* Licence summary :
|
||||
* You can modify and redistribute the sources code and binaries.
|
||||
* You can send me the bug-fix
|
||||
*
|
||||
* Term of the licence in in the file licence.txt.
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
* @author Edouard DUPIN, Kevin BILLONNEAU
|
||||
*
|
||||
* @copyright 2011, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license BSD v3 (see license file)
|
||||
*/
|
||||
|
||||
package org.ewol;
|
||||
|
||||
|
@ -1,26 +1,10 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file EwolCallback.java
|
||||
* @brief CPP callback.
|
||||
* @author Edouard DUPIN, Kevin BILLONNEAU
|
||||
* @date 20/04/2012
|
||||
* @par Project
|
||||
* ewol
|
||||
*
|
||||
* @par Copyright
|
||||
* Copyright 2011 Edouard DUPIN, all right reserved
|
||||
*
|
||||
* This software is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY.
|
||||
*
|
||||
* Licence summary :
|
||||
* You can modify and redistribute the sources code and binaries.
|
||||
* You can send me the bug-fix
|
||||
*
|
||||
* Term of the licence in in the file licence.txt.
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
* @author Edouard DUPIN, Kevin BILLONNEAU
|
||||
*
|
||||
* @copyright 2011, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license BSD v3 (see license file)
|
||||
*/
|
||||
|
||||
package org.ewol;
|
||||
|
||||
|
@ -1,31 +1,13 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file EwolConstants.java
|
||||
* @brief Java Contants interface.
|
||||
* @author Edouard DUPIN, Kevin BILLONNEAU
|
||||
* @date 29/06/2012
|
||||
* @par Project
|
||||
* ewol
|
||||
*
|
||||
* @par Copyright
|
||||
* Copyright 2011 Edouard DUPIN, all right reserved
|
||||
*
|
||||
* This software is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY.
|
||||
*
|
||||
* Licence summary :
|
||||
* You can modify and redistribute the sources code and binaries.
|
||||
* You can send me the bug-fix
|
||||
*
|
||||
* Term of the licence in in the file licence.txt.
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
* @author Edouard DUPIN, Kevin BILLONNEAU
|
||||
*
|
||||
* @copyright 2011, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license BSD v3 (see license file)
|
||||
*/
|
||||
|
||||
package org.ewol;
|
||||
|
||||
|
||||
|
||||
public interface EwolConstants {
|
||||
public static final int NATIVE_AUDIO_BUFFER_SIZE = 512;
|
||||
public static final int EWOL_SYSTEM_KEY_VOLUME_UP = 1;
|
||||
|
@ -1,26 +1,10 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file EwolRendererGL.java
|
||||
* @brief Java openGl interface code.
|
||||
* @author Edouard DUPIN, Kevin BILLONNEAU
|
||||
* @date 20/04/2012
|
||||
* @par Project
|
||||
* ewol
|
||||
*
|
||||
* @par Copyright
|
||||
* Copyright 2011 Edouard DUPIN, all right reserved
|
||||
*
|
||||
* This software is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY.
|
||||
*
|
||||
* Licence summary :
|
||||
* You can modify and redistribute the sources code and binaries.
|
||||
* You can send me the bug-fix
|
||||
*
|
||||
* Term of the licence in in the file licence.txt.
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
* @author Edouard DUPIN, Kevin BILLONNEAU
|
||||
*
|
||||
* @copyright 2011, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license BSD v3 (see license file)
|
||||
*/
|
||||
|
||||
package org.ewol;
|
||||
|
||||
|
@ -1,26 +1,10 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file EwolSurfaceViewGL.java
|
||||
* @brief Java interface of the java Surface viewer code.
|
||||
* @author Edouard DUPIN, Kevin BILLONNEAU
|
||||
* @date 20/04/2012
|
||||
* @par Project
|
||||
* ewol
|
||||
*
|
||||
* @par Copyright
|
||||
* Copyright 2011 Edouard DUPIN, all right reserved
|
||||
*
|
||||
* This software is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY.
|
||||
*
|
||||
* Licence summary :
|
||||
* You can modify and redistribute the sources code and binaries.
|
||||
* You can send me the bug-fix
|
||||
*
|
||||
* Term of the licence in in the file licence.txt.
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
* @author Edouard DUPIN, Kevin BILLONNEAU
|
||||
*
|
||||
* @copyright 2011, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license BSD v3 (see license file)
|
||||
*/
|
||||
|
||||
package org.ewol;
|
||||
|
||||
|
@ -14,32 +14,38 @@
|
||||
|
||||
// TODO : Set this in a super class acced in a statin fuction...
|
||||
// ratio in milimeter :
|
||||
static bool isInit = false;
|
||||
static vec2 ratio(9999999,888888);
|
||||
static vec2 invRatio(1,1);
|
||||
static ewol::Dimension windowsSize(vec2(9999999,888888), ewol::Dimension::Pixel);
|
||||
|
||||
static const float inchToMillimeter = 25.4f;
|
||||
static const float footToMillimeter = 304.8f;
|
||||
static const float meterToMillimeter = 1000.0f;
|
||||
static const float centimeterToMillimeter = 10.0f;
|
||||
static const float kilometerToMillimeter = 1000000.0f;
|
||||
static const float millimeterToInch = 1.0f/25.4f;
|
||||
static const float millimeterToFoot = 1.0f/304.8f;
|
||||
static const float millimeterToMeter = 1.0f/1000.0f;
|
||||
static const float millimeterToCentimeter = 1.0f/10.0f;
|
||||
static const float millimeterToKilometer = 1.0f/1000000.0f;
|
||||
static const float inchToMillimeter = 1.0f/25.4f;
|
||||
static const float footToMillimeter = 1.0f/304.8f;
|
||||
static const float meterToMillimeter = 1.0f/1000.0f;
|
||||
static const float centimeterToMillimeter = 1.0f/10.0f;
|
||||
static const float kilometerToMillimeter = 1.0f/1000000.0f;
|
||||
static const float millimeterToInch = 25.4f;
|
||||
static const float millimeterToFoot = 304.8f;
|
||||
static const float millimeterToMeter =1000.0f;
|
||||
static const float millimeterToCentimeter = 10.0f;
|
||||
static const float millimeterToKilometer = 1000000.0f;
|
||||
|
||||
|
||||
void ewol::dimension::Init(void)
|
||||
{
|
||||
if (true==isInit) {
|
||||
return;
|
||||
}
|
||||
ewol::Dimension conversion(vec2(72,72), ewol::Dimension::Inch);
|
||||
ratio = conversion.GetMillimeter();
|
||||
invRatio.setValue(1.0f/ratio.x(),1.0f/ratio.y());
|
||||
windowsSize.Set(vec2(200,200), ewol::Dimension::Pixel);
|
||||
isInit = true;
|
||||
}
|
||||
|
||||
void ewol::dimension::UnInit(void)
|
||||
{
|
||||
isInit = false;
|
||||
ratio.setValue(9999999,888888);
|
||||
invRatio.setValue(1.0f/ratio.x(),1.0f/ratio.y());
|
||||
windowsSize.Set(vec2(9999999,88888), ewol::Dimension::Pixel);
|
||||
@ -47,7 +53,10 @@ void ewol::dimension::UnInit(void)
|
||||
|
||||
void ewol::dimension::SetPixelRatio(const vec2& _ratio, ewol::Dimension::distance_te _type)
|
||||
{
|
||||
ewol::dimension::Init();
|
||||
EWOL_INFO("Set a new screen ratio for the screen : ratio=" << _ratio << " type=" << _type);
|
||||
ewol::Dimension conversion(_ratio, _type);
|
||||
EWOL_INFO(" ==> " << conversion);
|
||||
ratio = conversion.GetMillimeter();
|
||||
invRatio.setValue(1.0f/ratio.x(),1.0f/ratio.y());
|
||||
EWOL_INFO("Set a new screen ratio for the screen : ratioMm=" << ratio);
|
||||
|
@ -297,41 +297,53 @@ static int32_t nextP2(int32_t value)
|
||||
}
|
||||
val *=2;
|
||||
}
|
||||
EWOL_CRITICAL("impossible CASE....");
|
||||
EWOL_CRITICAL("impossible CASE.... request P2 of " << value);
|
||||
return val;
|
||||
}
|
||||
|
||||
bool ewol::resource::Keep(const etk::UString& filename, ewol::TextureFile*& object, ivec2 size)
|
||||
bool ewol::resource::Keep(const etk::UString& _filename, ewol::TextureFile*& _object, ivec2 _size)
|
||||
{
|
||||
etk::UString TmpFilename = filename;
|
||||
if (false == filename.EndWith(".svg") ) {
|
||||
size = ivec2(-1,-1);
|
||||
EWOL_ERROR("11111111111111 " << _filename << " " << _size);
|
||||
if (_size.x()==0) {
|
||||
_size.setX(-1);
|
||||
EWOL_ERROR("Error Request the image size.x() =0 ???");
|
||||
}
|
||||
if (_size.y()==0) {
|
||||
_size.setY(-1);
|
||||
EWOL_ERROR("Error Request the image size.y() =0 ???");
|
||||
}
|
||||
EWOL_ERROR("222222222222222222 " << _size);
|
||||
etk::UString TmpFilename = _filename;
|
||||
if (false == _filename.EndWith(".svg") ) {
|
||||
_size = ivec2(-1,-1);
|
||||
}
|
||||
EWOL_ERROR("3333333333333333 " << _size);
|
||||
#ifdef __TARGET_OS__MacOs
|
||||
EWOL_WARNING("TODO : Remove this strange hack");
|
||||
size = ivec2(64,64);
|
||||
_size = ivec2(64,64);
|
||||
#endif
|
||||
if (size.x()>0 && size.y()>0) {
|
||||
ivec2 size2(nextP2(size.x()), nextP2(size.y()));
|
||||
if (_size.x()>0 && _size.y()>0) {
|
||||
EWOL_ERROR("44444444444444 " << _size);
|
||||
ivec2 size2(nextP2(_size.x()), nextP2(_size.y()));
|
||||
TmpFilename += ":";
|
||||
TmpFilename += size2.x();
|
||||
TmpFilename += "x";
|
||||
TmpFilename += size2.y();
|
||||
}
|
||||
|
||||
EWOL_INFO("KEEP : TextureFile : file : \"" << TmpFilename << "\" basic size=" << size);
|
||||
object = static_cast<ewol::TextureFile*>(LocalKeep(TmpFilename));
|
||||
if (NULL != object) {
|
||||
EWOL_INFO("KEEP : TextureFile : file : \"" << TmpFilename << "\" basic size=" << _size);
|
||||
_object = static_cast<ewol::TextureFile*>(LocalKeep(TmpFilename));
|
||||
if (NULL != _object) {
|
||||
return true;
|
||||
}
|
||||
EWOL_INFO(" ==> create new one...");
|
||||
// need to crate a new one ...
|
||||
object = new ewol::TextureFile(TmpFilename, filename, size);
|
||||
if (NULL == object) {
|
||||
EWOL_ERROR("allocation error of a resource : " << filename);
|
||||
_object = new ewol::TextureFile(TmpFilename, _filename, _size);
|
||||
if (NULL == _object) {
|
||||
EWOL_ERROR("allocation error of a resource : " << _filename);
|
||||
return false;
|
||||
}
|
||||
LocalAdd(object);
|
||||
LocalAdd(_object);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -20,7 +20,7 @@
|
||||
ewol::TextureFile::TextureFile(etk::UString _genName, const etk::UString& _tmpfileName, const ivec2& _size) :
|
||||
Texture(_genName)
|
||||
{
|
||||
if (true == egami::Load(m_data, _tmpfileName, _size)) {
|
||||
if (false == egami::Load(m_data, _tmpfileName, _size)) {
|
||||
EWOL_ERROR("ERROR when loading the image : " << _tmpfileName);
|
||||
}
|
||||
ivec2 tmp = m_data.GetSize();
|
||||
|
@ -51,7 +51,7 @@ static int32_t nextP2(int32_t value)
|
||||
}
|
||||
val *=2;
|
||||
}
|
||||
EWOL_CRITICAL("impossible CASE....");
|
||||
EWOL_CRITICAL("impossible CASE.... request power 2 of "<< value);
|
||||
return val;
|
||||
}
|
||||
|
||||
@ -122,76 +122,83 @@ ewol::TexturedFont::TexturedFont(etk::UString fontName) :
|
||||
m_name = fontName.Extract(0, (tmpPos - tmpData));
|
||||
m_size = tmpSize;
|
||||
|
||||
etk::UString fontBaseFolder("DATA:fonts");
|
||||
etk::Vector<etk::UString> folderList;
|
||||
if (true==GetFontInSystem()) {
|
||||
#if defined(__TARGET_OS__Android)
|
||||
fontBaseFolder = "/system/font";
|
||||
folderList.PushBack("/system/fonts");
|
||||
#elif defined(__TARGET_OS__Linux)
|
||||
fontBaseFolder = "/usr/share/fonts/truetype";
|
||||
folderList.PushBack("/usr/share/fonts/truetype");
|
||||
#endif
|
||||
}
|
||||
etk::FSNode myFolder(fontBaseFolder);
|
||||
// find the real Font name :
|
||||
etk::Vector<etk::UString> output;
|
||||
myFolder.FolderGetRecursiveFiles(output);
|
||||
etk::Vector<etk::UString> split = m_name.Split(';');
|
||||
EWOL_INFO("try to find font named : '" << split << "' in : '" << myFolder <<"'");
|
||||
//EWOL_CRITICAL("parse string : " << split);
|
||||
|
||||
for (int32_t jjj=0; jjj<split.Size(); jjj++) {
|
||||
EWOL_INFO(" try with : '" << split[jjj] << "'");
|
||||
folderList.PushBack("DATA:fonts");
|
||||
for (int32_t folderID=0; folderID<folderList.Size() ; folderID++) {
|
||||
etk::FSNode myFolder(folderList[folderID]);
|
||||
// find the real Font name :
|
||||
etk::Vector<etk::UString> output;
|
||||
myFolder.FolderGetRecursiveFiles(output);
|
||||
etk::Vector<etk::UString> split = m_name.Split(';');
|
||||
EWOL_INFO("try to find font named : '" << split << "' in : '" << myFolder <<"'");
|
||||
//EWOL_CRITICAL("parse string : " << split);
|
||||
bool hasFindAFont = false;
|
||||
for (int32_t iii=0; iii<output.Size(); iii++) {
|
||||
//EWOL_DEBUG(" file : " << output[iii]);
|
||||
if( true == output[iii].EndWith(split[jjj]+"-"+"bold"+".ttf", false)
|
||||
|| true == output[iii].EndWith(split[jjj]+"-"+"b"+".ttf", false)
|
||||
|| true == output[iii].EndWith(split[jjj]+"-"+"bd"+".ttf", false)
|
||||
|| true == output[iii].EndWith(split[jjj]+"bold"+".ttf", false)
|
||||
|| true == output[iii].EndWith(split[jjj]+"bd"+".ttf", false)
|
||||
|| true == output[iii].EndWith(split[jjj]+"b"+".ttf", false)) {
|
||||
EWOL_INFO(" find Font [Bold] : " << output[iii]);
|
||||
m_fileName[ewol::font::Bold] = output[iii];
|
||||
hasFindAFont=true;
|
||||
} else if( true == output[iii].EndWith(split[jjj]+"-"+"oblique"+".ttf", false)
|
||||
|| true == output[iii].EndWith(split[jjj]+"-"+"italic"+".ttf", false)
|
||||
|| true == output[iii].EndWith(split[jjj]+"-"+"Light"+".ttf", false)
|
||||
|| true == output[iii].EndWith(split[jjj]+"-"+"i"+".ttf", false)
|
||||
|| true == output[iii].EndWith(split[jjj]+"oblique"+".ttf", false)
|
||||
|| true == output[iii].EndWith(split[jjj]+"italic"+".ttf", false)
|
||||
|| true == output[iii].EndWith(split[jjj]+"light"+".ttf", false)
|
||||
|| true == output[iii].EndWith(split[jjj]+"i"+".ttf", false)) {
|
||||
EWOL_INFO(" find Font [Italic] : " << output[iii]);
|
||||
m_fileName[ewol::font::Italic] = output[iii];
|
||||
hasFindAFont=true;
|
||||
} else if( true == output[iii].EndWith(split[jjj]+"-"+"bolditalic"+".ttf", false)
|
||||
|| true == output[iii].EndWith(split[jjj]+"-"+"boldoblique"+".ttf", false)
|
||||
|| true == output[iii].EndWith(split[jjj]+"-"+"bi"+".ttf", false)
|
||||
|| true == output[iii].EndWith(split[jjj]+"-"+"z"+".ttf", false)
|
||||
|| true == output[iii].EndWith(split[jjj]+"bolditalic"+".ttf", false)
|
||||
|| true == output[iii].EndWith(split[jjj]+"boldoblique"+".ttf", false)
|
||||
|| true == output[iii].EndWith(split[jjj]+"bi"+".ttf", false)
|
||||
|| true == output[iii].EndWith(split[jjj]+"z"+".ttf", false)) {
|
||||
EWOL_INFO(" find Font [Bold-Italic] : " << output[iii]);
|
||||
m_fileName[ewol::font::BoldItalic] = output[iii];
|
||||
hasFindAFont=true;
|
||||
} else if( true == output[iii].EndWith(split[jjj]+"-"+"regular"+".ttf", false)
|
||||
|| true == output[iii].EndWith(split[jjj]+"-"+"r"+".ttf", false)
|
||||
|| true == output[iii].EndWith(split[jjj]+"regular"+".ttf", false)
|
||||
|| true == output[iii].EndWith(split[jjj]+"r"+".ttf", false)
|
||||
|| true == output[iii].EndWith(split[jjj]+".ttf", false)) {
|
||||
EWOL_INFO(" find Font [Regular] : " << output[iii]);
|
||||
m_fileName[ewol::font::Regular] = output[iii];
|
||||
hasFindAFont=true;
|
||||
for (int32_t jjj=0; jjj<split.Size(); jjj++) {
|
||||
EWOL_INFO(" try with : '" << split[jjj] << "'");
|
||||
for (int32_t iii=0; iii<output.Size(); iii++) {
|
||||
//EWOL_DEBUG(" file : " << output[iii]);
|
||||
if( true == output[iii].EndWith(split[jjj]+"-"+"bold"+".ttf", false)
|
||||
|| true == output[iii].EndWith(split[jjj]+"-"+"b"+".ttf", false)
|
||||
|| true == output[iii].EndWith(split[jjj]+"-"+"bd"+".ttf", false)
|
||||
|| true == output[iii].EndWith(split[jjj]+"bold"+".ttf", false)
|
||||
|| true == output[iii].EndWith(split[jjj]+"bd"+".ttf", false)
|
||||
|| true == output[iii].EndWith(split[jjj]+"b"+".ttf", false)) {
|
||||
EWOL_INFO(" find Font [Bold] : " << output[iii]);
|
||||
m_fileName[ewol::font::Bold] = output[iii];
|
||||
hasFindAFont=true;
|
||||
} else if( true == output[iii].EndWith(split[jjj]+"-"+"oblique"+".ttf", false)
|
||||
|| true == output[iii].EndWith(split[jjj]+"-"+"italic"+".ttf", false)
|
||||
|| true == output[iii].EndWith(split[jjj]+"-"+"Light"+".ttf", false)
|
||||
|| true == output[iii].EndWith(split[jjj]+"-"+"i"+".ttf", false)
|
||||
|| true == output[iii].EndWith(split[jjj]+"oblique"+".ttf", false)
|
||||
|| true == output[iii].EndWith(split[jjj]+"italic"+".ttf", false)
|
||||
|| true == output[iii].EndWith(split[jjj]+"light"+".ttf", false)
|
||||
|| true == output[iii].EndWith(split[jjj]+"i"+".ttf", false)) {
|
||||
EWOL_INFO(" find Font [Italic] : " << output[iii]);
|
||||
m_fileName[ewol::font::Italic] = output[iii];
|
||||
hasFindAFont=true;
|
||||
} else if( true == output[iii].EndWith(split[jjj]+"-"+"bolditalic"+".ttf", false)
|
||||
|| true == output[iii].EndWith(split[jjj]+"-"+"boldoblique"+".ttf", false)
|
||||
|| true == output[iii].EndWith(split[jjj]+"-"+"bi"+".ttf", false)
|
||||
|| true == output[iii].EndWith(split[jjj]+"-"+"z"+".ttf", false)
|
||||
|| true == output[iii].EndWith(split[jjj]+"bolditalic"+".ttf", false)
|
||||
|| true == output[iii].EndWith(split[jjj]+"boldoblique"+".ttf", false)
|
||||
|| true == output[iii].EndWith(split[jjj]+"bi"+".ttf", false)
|
||||
|| true == output[iii].EndWith(split[jjj]+"z"+".ttf", false)) {
|
||||
EWOL_INFO(" find Font [Bold-Italic] : " << output[iii]);
|
||||
m_fileName[ewol::font::BoldItalic] = output[iii];
|
||||
hasFindAFont=true;
|
||||
} else if( true == output[iii].EndWith(split[jjj]+"-"+"regular"+".ttf", false)
|
||||
|| true == output[iii].EndWith(split[jjj]+"-"+"r"+".ttf", false)
|
||||
|| true == output[iii].EndWith(split[jjj]+"regular"+".ttf", false)
|
||||
|| true == output[iii].EndWith(split[jjj]+"r"+".ttf", false)
|
||||
|| true == output[iii].EndWith(split[jjj]+".ttf", false)) {
|
||||
EWOL_INFO(" find Font [Regular] : " << output[iii]);
|
||||
m_fileName[ewol::font::Regular] = output[iii];
|
||||
hasFindAFont=true;
|
||||
}
|
||||
}
|
||||
if (hasFindAFont==true) {
|
||||
EWOL_INFO(" Find this font : '" << split[jjj] << "'");
|
||||
break;
|
||||
} else if (jjj==split.Size()-1) {
|
||||
EWOL_ERROR("Find NO font in the LIST ... " << split);
|
||||
}
|
||||
}
|
||||
if (hasFindAFont==true) {
|
||||
EWOL_INFO(" Find this font : '" << split[jjj] << "'");
|
||||
EWOL_INFO(" Find this font : '" << folderList[folderID] << "'");
|
||||
break;
|
||||
} else if (jjj==split.Size()-1) {
|
||||
EWOL_ERROR("Find NO font in the LIST ... " << split);
|
||||
} else if (folderID==folderList.Size()-1) {
|
||||
EWOL_ERROR("Find NO font in the LIST ... " << folderList);
|
||||
}
|
||||
}
|
||||
|
||||
// try to find the reference mode :
|
||||
ewol::font::mode_te refMode = ewol::font::Regular;
|
||||
for(int32_t iii=3; iii>=0; iii--) {
|
||||
|
@ -54,16 +54,19 @@ widget::Image::Image(const etk::UString& _file, const ewol::Dimension& _border)
|
||||
|
||||
void widget::Image::SetFile(const etk::UString& _file)
|
||||
{
|
||||
EWOL_DEBUG("Set Image : " << _file);
|
||||
// copy data :
|
||||
m_fileName = _file;
|
||||
// Force redraw all :
|
||||
MarkToRedraw();
|
||||
ewol::RequestUpdateSize();
|
||||
EWOL_DEBUG("Set sources : " << m_fileName << " size=" << vec2(64,64));
|
||||
m_compositing.SetSource(m_fileName, vec2(64,64));
|
||||
}
|
||||
|
||||
void widget::Image::SetBorder(const ewol::Dimension& _border)
|
||||
{
|
||||
EWOL_DEBUG("Set border=" << _border);
|
||||
// copy data :
|
||||
m_border = _border;
|
||||
// Force redraw all :
|
||||
@ -85,20 +88,24 @@ void widget::Image::SetKeepRatio(bool _keep)
|
||||
|
||||
void widget::Image::SetImageSize(const ewol::Dimension& _size)
|
||||
{
|
||||
EWOL_DEBUG("Set Image size : " << _size);
|
||||
m_imageSize = _size;
|
||||
MarkToRedraw();
|
||||
ewol::RequestUpdateSize();
|
||||
EWOL_DEBUG("Set sources : " << m_fileName << " size=" << m_imageSize);
|
||||
m_compositing.SetSource(m_fileName, m_imageSize.GetPixel());
|
||||
}
|
||||
|
||||
void widget::Image::Set(const etk::UString& _file, const ewol::Dimension& _border)
|
||||
{
|
||||
EWOL_DEBUG("Set Image : " << _file << " border=" << _border);
|
||||
// copy data :
|
||||
m_border = _border;
|
||||
m_fileName = _file;
|
||||
// Force redraw all :
|
||||
MarkToRedraw();
|
||||
ewol::RequestUpdateSize();
|
||||
EWOL_DEBUG("Set sources : " << m_fileName << " size=" << m_imageSize);
|
||||
m_compositing.SetSource(m_fileName, m_imageSize.GetPixel());
|
||||
}
|
||||
|
||||
|
@ -195,8 +195,8 @@ def Create(target):
|
||||
java_tmp_src = java_tmp_dir + "org/ewol/EwolConstants"
|
||||
lutinMultiprocess.RunCommand("javac " + java_tmp_src + ".java")
|
||||
lutinMultiprocess.RunCommand("cd " + java_tmp_dir + " && javah org.ewol.EwolConstants")
|
||||
lutinMultiprocess.RunCommand("mv " + java_tmp_dir + "org_ewol_EwolConstants.h " + cpp_tmp_dir)
|
||||
lutinMultiprocess.RunCommand("rm " + java_tmp_src + ".class")
|
||||
lutinTools.CopyFile(java_tmp_dir + "org_ewol_EwolConstants.h", cpp_tmp_dir + "org_ewol_EwolConstants.h", True)
|
||||
lutinTools.RemoveFile(java_tmp_src + ".class")
|
||||
|
||||
myModule.AddSrcFile("ewol/renderer/os/gui.Android.cpp")
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user