Test parser SVG
This commit is contained in:
parent
a85028f8d5
commit
55d6f48f0d
@ -3,7 +3,7 @@ LOCAL_PATH := $(call my-dir)
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_MODULE := ewolDrawer
|
||||
LOCAL_STATIC_LIBRARIES := ewol etk tinyxml libzip libpng libfreetype
|
||||
LOCAL_STATIC_LIBRARIES := ewol etk tinyxml libzip libpng libfreetype parsersvg agg
|
||||
|
||||
|
||||
# load the common sources file of the platform
|
||||
|
15
jni/Main.cpp
15
jni/Main.cpp
@ -41,6 +41,7 @@
|
||||
#include <ewol/widget/widgetE2D.h>
|
||||
#include <ewol/widgetMeta/FileChooser.h>
|
||||
#include <ewol/WidgetManager.h>
|
||||
#include <parserSVG/parserSVG.h>
|
||||
#include <globalMsg.h>
|
||||
#include <widgetDrawer.h>
|
||||
#include <elementManager.h>
|
||||
@ -284,10 +285,11 @@ class MainWindows :public ewol::Windows
|
||||
etk::UString tmpData = tmpWidget->GetCompleateFileName();
|
||||
DRAW_DEBUG("Request opening the file : " << tmpData);
|
||||
if (NULL != m_drawer) {
|
||||
m_drawer->Load(tmpData);
|
||||
//m_drawer->Load(tmpData);
|
||||
}
|
||||
} else if (eventId == drawMsgGuiSave) {
|
||||
if (NULL != m_drawer) {
|
||||
/*
|
||||
if (m_drawer->HasName()) {
|
||||
m_drawer->Save();
|
||||
} else {
|
||||
@ -297,6 +299,7 @@ class MainWindows :public ewol::Windows
|
||||
PopUpWidgetPush(tmpWidget);
|
||||
tmpWidget->RegisterOnEvent(this, ewolEventFileChooserValidate, drawerEventRequestSaveFileSelected);
|
||||
}
|
||||
*/
|
||||
}
|
||||
} else if (eventId == drawerEventRequestSaveFileSelected) {
|
||||
// get widget:
|
||||
@ -309,8 +312,10 @@ class MainWindows :public ewol::Windows
|
||||
etk::UString tmpData = tmpWidget->GetCompleateFileName();
|
||||
DRAW_DEBUG("Request opening the file : " << tmpData);
|
||||
if (NULL != m_drawer) {
|
||||
/*
|
||||
m_drawer->SetFilename(tmpData);
|
||||
m_drawer->Save();
|
||||
*/
|
||||
}
|
||||
} else if (eventId == drawerEventColorHasChange) {
|
||||
// the button color has change ==> we really change the current color ...
|
||||
@ -442,6 +447,14 @@ void APP_Init(void)
|
||||
// create the specific windows
|
||||
ewol::DisplayWindows(basicWindows);
|
||||
DRAW_INFO("==> Init Ewol Drawer (END)");
|
||||
etk::File svgFile("lion.svg", etk::FILE_TYPE_DATA);
|
||||
svg::Parser *mySVGElement = new svg::Parser(svgFile);
|
||||
|
||||
mySVGElement->DisplayDebug();
|
||||
mySVGElement->GenerateTestFile();
|
||||
|
||||
exit(-1);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -28,7 +28,7 @@ namespace drawElement {
|
||||
coord2D_ts m_center;
|
||||
int32_t m_nbRay;
|
||||
etkFloat_t m_ratio;
|
||||
bool m_fill
|
||||
bool m_fill;
|
||||
etkFloat_t m_thickness;
|
||||
etkFloat_t m_shadowOutput;
|
||||
etkFloat_t m_shadowInput;
|
||||
|
@ -170,6 +170,7 @@ bool drawElement::HasName(void)
|
||||
|
||||
void drawElement::Load(etk::UString fileName)
|
||||
{
|
||||
/*
|
||||
drawElement::RemoveAll();
|
||||
SetFilename(newFileName);
|
||||
|
||||
@ -218,7 +219,7 @@ void drawElement::Load(etk::UString fileName)
|
||||
if (pNode->Type()==TiXmlNode::TINYXML_COMMENT) {
|
||||
// nothing to do, just proceed to next step
|
||||
} else if (!strcmp(pNode->Value(), "element")) {
|
||||
/*
|
||||
#if 0
|
||||
for(TiXmlNode * pGuiNode = pNode->FirstChild();
|
||||
NULL != pGuiNode;
|
||||
pGuiNode = pGuiNode->NextSibling()) {
|
||||
@ -280,7 +281,7 @@ void drawElement::Load(etk::UString fileName)
|
||||
DRAW_ERROR("(l "<<pGuiNode->Row()<<") node not suported : \""<<pGuiNode->Value()<<"\" must be [dot,link]");
|
||||
}
|
||||
}
|
||||
*/
|
||||
#endif
|
||||
} else {
|
||||
DRAW_ERROR("(l "<<pNode->Row()<<") node not suported : \""<<pNode->Value()<<"\" must be [element]");
|
||||
}
|
||||
@ -289,10 +290,12 @@ void drawElement::Load(etk::UString fileName)
|
||||
if (NULL != fileBuffer) {
|
||||
delete[] fileBuffer;
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
void drawElement::Save(void)
|
||||
{
|
||||
/*
|
||||
if (l_fileName == "") {
|
||||
DRAW_ERROR("No filename set ...");
|
||||
return;
|
||||
@ -347,5 +350,6 @@ void drawElement::Save(void)
|
||||
}
|
||||
//Save Document
|
||||
doc.SaveFile( l_fileName.Utf8Data() );
|
||||
*/
|
||||
}
|
||||
|
||||
|
@ -27,7 +27,7 @@ namespace drawElement {
|
||||
color_ts m_colorInside;
|
||||
coord2D_ts m_center;
|
||||
coord2D_ts m_size;
|
||||
bool m_fill
|
||||
bool m_fill;
|
||||
etkFloat_t m_thickness;
|
||||
etkFloat_t m_shadowOutput;
|
||||
etkFloat_t m_shadowInput;
|
||||
|
Loading…
x
Reference in New Issue
Block a user