[DEV] Update of the choice of standardize the Color class

This commit is contained in:
Edouard DUPIN 2013-07-09 15:15:51 +02:00
parent d2a0e5005b
commit 595495b8bd
62 changed files with 466 additions and 1367 deletions

3
.gitmodules vendored
View File

@ -41,3 +41,6 @@
[submodule "external/exml"]
path = external/exml
url = https://github.com/HeeroYui/exml.git
[submodule "external/egami"]
path = external/egami
url = https://github.com/HeeroYui/egami.git

2
build

@ -1 +1 @@
Subproject commit 04ebd5ce2e8c9b0edf461e7f4e990b9cc7ea40bf
Subproject commit 265542cb3d085564fe2b8a813c9ec241a09f9348

2
external/agg vendored

@ -1 +1 @@
Subproject commit 9f546dd5ed8ee74c2bda85b72e3d987c877e6e72
Subproject commit 64280cda086d931f7af6ac4ce29e181ceee8f45b

1
external/egami vendored Submodule

@ -0,0 +1 @@
Subproject commit 4c40195075a535ebe38416099df83a7f39051083

2
external/esvg vendored

@ -1 +1 @@
Subproject commit b8bb3aebf2cbf3baee2b11ce94249294d657bca3
Subproject commit 1b0c7b47044a757d99128d3fb89476526324e7f0

2
external/etk vendored

@ -1 +1 @@
Subproject commit d93fbe0c023e8cd2f624d4873ce5af86c9267916
Subproject commit 6fde63610d6ae50c13a1126ab80306bb841e2d52

View File

@ -1,40 +0,0 @@
#!/usr/bin/python
# --------------------------------------------------------
# -- Ogre_main librairy
# --------------------------------------------------------
import lutinModule
import lutinTools
def Create(target):
myModule = lutinModule.module(__file__, 'ogre', 'LIBRARY')
myModule.AddModuleDepend([
'ogre_main',
'ogre_paging',
'ogre_plugin_BSPSceneManager',
'ogre_plugin_OctreeSceneManager',
'ogre_plugin_OctreeZone',
'ogre_plugin_PCZSceneManager',
'ogre_plugin_particuleFX',
'ogre_RenderGL',
'ogre_RTShaderSystem',
'ogre_terrain'])
"""
myModule.CompileFlags_CC([
])
myModule.AddExportPath(lutinTools.GetCurrentPath(__file__)+"/ogre/OgreMain/include")
myModule.AddPath(lutinTools.GetCurrentPath(__file__)+"/ogre/include")
myModule.AddPath(lutinTools.GetCurrentPath(__file__)+"/ogre")
myModule.AddPath(lutinTools.GetCurrentPath(__file__)+"/ogre/OgreMain/include/Threading")
myModule.AddPath(lutinTools.GetCurrentPath(__file__)+"/ogre/OgreMain/include/GLX")
myModule.AddPath(lutinTools.GetCurrentPath(__file__)+"/ogre/OgreMain/src/nedmalloc")
myModule.AddSrcFile([
])
"""
# add the currrent module at the
return myModule

View File

@ -1,77 +0,0 @@
#!/usr/bin/python
# --------------------------------------------------------
# -- Ogre_main librairy
# --------------------------------------------------------
import lutinModule
import lutinTools
def Create(target):
myModule = lutinModule.module(__file__, 'ogre_RTShaderSystem', 'LIBRARY')
myModule.AddModuleDepend(['ogre_main'])
myModule.CompileFlags_CC([
'-DOgreRTShaderSystem_EXPORTS',
'-msse',
'-Wno-deprecated',
'-Wall',
'-Wctor-dtor-privacy',
'-Winit-self',
'-Wno-overloaded-virtual',
'-Wcast-qual',
'-Wwrite-strings',
'-Wextra',
'-Wno-unused-parameter',
'-pedantic',
'-Wshadow',
'-Wno-missing-field-initializers',
'-Wno-long-long',
'-Wno-unused-but-set-parameter',
'-O2',
'-DNDEBUG'])
myModule.AddExportPath(lutinTools.GetCurrentPath(__file__)+"/ogre/Components/RTShaderSystem/include")
myModule.AddSrcFile([
'ogre/Components/RTShaderSystem/src/OgreShaderFFPColour.cpp',
'ogre/Components/RTShaderSystem/src/OgreShaderFFPFog.cpp',
'ogre/Components/RTShaderSystem/src/OgreShaderFFPLighting.cpp',
'ogre/Components/RTShaderSystem/src/OgreShaderFFPRenderStateBuilder.cpp',
'ogre/Components/RTShaderSystem/src/OgreShaderFFPTexturing.cpp',
'ogre/Components/RTShaderSystem/src/OgreShaderFFPTransform.cpp',
'ogre/Components/RTShaderSystem/src/OgreShaderFunction.cpp',
'ogre/Components/RTShaderSystem/src/OgreShaderFunctionAtom.cpp',
'ogre/Components/RTShaderSystem/src/OgreShaderGenerator.cpp',
'ogre/Components/RTShaderSystem/src/OgreShaderParameter.cpp',
'ogre/Components/RTShaderSystem/src/OgreShaderProgram.cpp',
'ogre/Components/RTShaderSystem/src/OgreShaderProgramManager.cpp',
'ogre/Components/RTShaderSystem/src/OgreShaderProgramSet.cpp',
'ogre/Components/RTShaderSystem/src/OgreShaderProgramWriter.cpp',
'ogre/Components/RTShaderSystem/src/OgreShaderRenderState.cpp',
'ogre/Components/RTShaderSystem/src/OgreShaderSubRenderState.cpp',
'ogre/Components/RTShaderSystem/src/OgreShaderExNormalMapLighting.cpp',
'ogre/Components/RTShaderSystem/src/OgreShaderExPerPixelLighting.cpp',
'ogre/Components/RTShaderSystem/src/OgreShaderExIntegratedPSSM3.cpp',
'ogre/Components/RTShaderSystem/src/OgreShaderScriptTranslator.cpp',
'ogre/Components/RTShaderSystem/src/OgreShaderMaterialSerializerListener.cpp',
'ogre/Components/RTShaderSystem/src/OgreShaderProgramProcessor.cpp',
'ogre/Components/RTShaderSystem/src/OgreShaderCGProgramProcessor.cpp',
'ogre/Components/RTShaderSystem/src/OgreShaderCGProgramWriter.cpp',
'ogre/Components/RTShaderSystem/src/OgreShaderGLSLProgramProcessor.cpp',
'ogre/Components/RTShaderSystem/src/OgreShaderGLSLProgramWriter.cpp',
'ogre/Components/RTShaderSystem/src/OgreShaderGLSLESProgramProcessor.cpp',
'ogre/Components/RTShaderSystem/src/OgreShaderGLSLESProgramWriter.cpp',
'ogre/Components/RTShaderSystem/src/OgreShaderProgramWriterManager.cpp',
'ogre/Components/RTShaderSystem/src/OgreShaderHLSLProgramProcessor.cpp',
'ogre/Components/RTShaderSystem/src/OgreShaderHLSLProgramWriter.cpp',
'ogre/Components/RTShaderSystem/src/OgreShaderExLayeredBlending.cpp',
'ogre/Components/RTShaderSystem/src/OgreShaderExHardwareSkinning.cpp',
'ogre/Components/RTShaderSystem/src/OgreShaderExHardwareSkinningTechnique.cpp',
'ogre/Components/RTShaderSystem/src/OgreShaderExDualQuaternionSkinning.cpp',
'ogre/Components/RTShaderSystem/src/OgreShaderExLinearSkinning.cpp',
'ogre/Components/RTShaderSystem/src/OgreShaderExTextureAtlasSampler.cpp'])
# add the currrent module at the
return myModule

View File

@ -1,108 +0,0 @@
#!/usr/bin/python
# --------------------------------------------------------
# -- Ogre_main librairy
# --------------------------------------------------------
import lutinModule
import lutinTools
def Create(target):
myModule = lutinModule.module(__file__, 'ogre_RenderGL', 'LIBRARY')
myModule.AddModuleDepend(['ogre_main'])
myModule.CompileFlags_CC([
'-DRenderSystem_GL_EXPORTS',
'-msse',
'-Wno-deprecated',
'-Wall',
'-Wctor-dtor-privacy',
'-Winit-self',
'-Wno-overloaded-virtual',
'-Wcast-qual',
'-Wwrite-strings',
'-Wextra',
'-Wno-unused-parameter',
'-pedantic',
'-Wshadow',
'-Wno-missing-field-initializers',
'-Wno-long-long',
'-Wno-unused-but-set-parameter',
'-O2',
'-DNDEBUG'])
myModule.AddExportPath(lutinTools.GetCurrentPath(__file__)+"/ogre/RenderSystems/GL/src/GLX")
myModule.AddExportPath(lutinTools.GetCurrentPath(__file__)+"/ogre/RenderSystems/GL/include/GLX")
myModule.AddExportPath(lutinTools.GetCurrentPath(__file__)+"/ogre/RenderSystems/GL/include")
myModule.AddExportPath(lutinTools.GetCurrentPath(__file__)+"/ogre/RenderSystems/GL/src/GLSL/include")
myModule.AddExportPath(lutinTools.GetCurrentPath(__file__)+"/ogre/RenderSystems/GL/src/atifs/include")
myModule.AddExportPath(lutinTools.GetCurrentPath(__file__)+"/ogre/RenderSystems/GL/src/nvparse")
myModule.AddSrcFile([
'ogre/RenderSystems/GL/src/GLSL/src/OgreGLSLExtSupport.cpp',
'ogre/RenderSystems/GL/src/GLSL/src/OgreGLSLGpuProgram.cpp',
'ogre/RenderSystems/GL/src/GLSL/src/OgreGLSLLinkProgram.cpp',
'ogre/RenderSystems/GL/src/GLSL/src/OgreGLSLLinkProgramManager.cpp',
'ogre/RenderSystems/GL/src/GLSL/src/OgreGLSLPreprocessor.cpp',
'ogre/RenderSystems/GL/src/GLSL/src/OgreGLSLProgram.cpp',
'ogre/RenderSystems/GL/src/GLSL/src/OgreGLSLProgramFactory.cpp',
'ogre/RenderSystems/GL/src/atifs/src/ATI_FS_GLGpuProgram.cpp',
'ogre/RenderSystems/GL/src/atifs/src/Compiler2Pass.cpp',
'ogre/RenderSystems/GL/src/atifs/src/ps_1_4.cpp',
'ogre/RenderSystems/GL/src/nvparse/avp1.0_impl.cpp',
'ogre/RenderSystems/GL/src/nvparse/nvparse.cpp',
'ogre/RenderSystems/GL/src/nvparse/nvparse_errors.cpp',
'ogre/RenderSystems/GL/src/nvparse/_ps1.0_lexer.cpp',
'ogre/RenderSystems/GL/src/nvparse/_ps1.0_parser.cpp',
'ogre/RenderSystems/GL/src/nvparse/ps1.0_program.cpp',
'ogre/RenderSystems/GL/src/nvparse/rc1.0_combiners.cpp',
'ogre/RenderSystems/GL/src/nvparse/rc1.0_final.cpp',
'ogre/RenderSystems/GL/src/nvparse/rc1.0_general.cpp',
'ogre/RenderSystems/GL/src/nvparse/_rc1.0_lexer.cpp',
'ogre/RenderSystems/GL/src/nvparse/_rc1.0_parser.cpp',
'ogre/RenderSystems/GL/src/nvparse/ts1.0_inst.cpp',
'ogre/RenderSystems/GL/src/nvparse/ts1.0_inst_list.cpp',
'ogre/RenderSystems/GL/src/nvparse/_ts1.0_lexer.cpp',
'ogre/RenderSystems/GL/src/nvparse/_ts1.0_parser.cpp',
'ogre/RenderSystems/GL/src/nvparse/vcp1.0_impl.cpp',
'ogre/RenderSystems/GL/src/nvparse/vp1.0_impl.cpp',
'ogre/RenderSystems/GL/src/nvparse/vs1.0_inst.cpp',
'ogre/RenderSystems/GL/src/nvparse/vs1.0_inst_list.cpp',
'ogre/RenderSystems/GL/src/nvparse/_vs1.0_lexer.cpp',
'ogre/RenderSystems/GL/src/nvparse/_vs1.0_parser.cpp',
'ogre/RenderSystems/GL/src/nvparse/vsp1.0_impl.cpp',
'ogre/RenderSystems/GL/src/GLX/OgreGLXContext.cpp',
'ogre/RenderSystems/GL/src/GLX/OgreGLXGLSupport.cpp',
'ogre/RenderSystems/GL/src/GLX/OgreGLXRenderTexture.cpp',
'ogre/RenderSystems/GL/src/GLX/OgreGLXWindow.cpp',
'ogre/RenderSystems/GL/src/OgreGLATIFSInit.cpp',
'ogre/RenderSystems/GL/src/OgreGLContext.cpp',
'ogre/RenderSystems/GL/src/OgreGLDefaultHardwareBufferManager.cpp',
'ogre/RenderSystems/GL/src/OgreGLDepthBuffer.cpp',
'ogre/RenderSystems/GL/src/OgreGLEngineDll.cpp',
'ogre/RenderSystems/GL/src/OgreGLFBOMultiRenderTarget.cpp',
'ogre/RenderSystems/GL/src/OgreGLFBORenderTexture.cpp',
'ogre/RenderSystems/GL/src/OgreGLFrameBufferObject.cpp',
'ogre/RenderSystems/GL/src/OgreGLGpuNvparseProgram.cpp',
'ogre/RenderSystems/GL/src/OgreGLGpuProgram.cpp',
'ogre/RenderSystems/GL/src/OgreGLGpuProgramManager.cpp',
'ogre/RenderSystems/GL/src/OgreGLHardwareBufferManager.cpp',
'ogre/RenderSystems/GL/src/OgreGLHardwareIndexBuffer.cpp',
'ogre/RenderSystems/GL/src/OgreGLHardwareOcclusionQuery.cpp',
'ogre/RenderSystems/GL/src/OgreGLHardwarePixelBuffer.cpp',
'ogre/RenderSystems/GL/src/OgreGLHardwareVertexBuffer.cpp',
'ogre/RenderSystems/GL/src/OgreGLPBRenderTexture.cpp',
'ogre/RenderSystems/GL/src/OgreGLPixelFormat.cpp',
'ogre/RenderSystems/GL/src/OgreGLPlugin.cpp',
'ogre/RenderSystems/GL/src/OgreGLRenderSystem.cpp',
'ogre/RenderSystems/GL/src/OgreGLRenderTexture.cpp',
'ogre/RenderSystems/GL/src/OgreGLRenderToVertexBuffer.cpp',
'ogre/RenderSystems/GL/src/OgreGLSupport.cpp',
'ogre/RenderSystems/GL/src/OgreGLTexture.cpp',
'ogre/RenderSystems/GL/src/OgreGLTextureManager.cpp',
'ogre/RenderSystems/GL/src/glew.cpp'])
# add the currrent module at the
return myModule

View File

@ -1,241 +0,0 @@
#!/usr/bin/python
# --------------------------------------------------------
# -- Ogre_main librairy
# --------------------------------------------------------
import lutinModule
import lutinTools
def Create(target):
myModule = lutinModule.module(__file__, 'ogre_main', 'LIBRARY')
myModule.AddModuleDepend(['freetype'])
myModule.CompileFlags_CC([
'-DOGRE_STATIC_LIB',
'-msse',
'-Wno-deprecated',
'-Wall',
'-Wctor-dtor-privacy',
'-Winit-self',
'-Wno-overloaded-virtual',
'-Wcast-qual',
'-Wwrite-strings',
'-Wextra',
'-Wno-unused-parameter',
'-pedantic',
'-Wshadow',
'-Wno-missing-field-initializers',
'-Wno-long-long',
'-Wno-unused-but-set-parameter',
'-O2',
'-DNDEBUG'])
myModule.AddExportPath(lutinTools.GetCurrentPath(__file__)+"/ogre/OgreMain/include")
myModule.AddExportPath(lutinTools.GetCurrentPath(__file__)+"/ogre/include")
myModule.AddExportPath(lutinTools.GetCurrentPath(__file__)+"/ogre")
myModule.AddExportPath(lutinTools.GetCurrentPath(__file__)+"/ogre/OgreMain/include/Threading")
myModule.AddPath(lutinTools.GetCurrentPath(__file__)+"/ogre/OgreMain/include/GLX")
myModule.AddPath(lutinTools.GetCurrentPath(__file__)+"/ogre/OgreMain/src/nedmalloc")
myModule.AddSrcFile([
'ogre/OgreMain/src/OgreAlignedAllocator.cpp',
'ogre/OgreMain/src/OgreAnimable.cpp',
'ogre/OgreMain/src/OgreAnimation.cpp',
'ogre/OgreMain/src/OgreAnimationState.cpp',
'ogre/OgreMain/src/OgreAnimationTrack.cpp',
'ogre/OgreMain/src/OgreArchiveManager.cpp',
'ogre/OgreMain/src/OgreAutoParamDataSource.cpp',
'ogre/OgreMain/src/OgreAxisAlignedBox.cpp',
'ogre/OgreMain/src/OgreBillboard.cpp',
'ogre/OgreMain/src/OgreBillboardChain.cpp',
'ogre/OgreMain/src/OgreBillboardParticleRenderer.cpp',
'ogre/OgreMain/src/OgreBillboardSet.cpp',
'ogre/OgreMain/src/OgreBone.cpp',
'ogre/OgreMain/src/OgreBorderPanelOverlayElement.cpp',
'ogre/OgreMain/src/OgreCamera.cpp',
'ogre/OgreMain/src/OgreCodec.cpp',
'ogre/OgreMain/src/OgreColourValue.cpp',
'ogre/OgreMain/src/OgreCommon.cpp',
'ogre/OgreMain/src/OgreCompositionPass.cpp',
'ogre/OgreMain/src/OgreCompositionTargetPass.cpp',
'ogre/OgreMain/src/OgreCompositionTechnique.cpp',
'ogre/OgreMain/src/OgreCompositor.cpp',
'ogre/OgreMain/src/OgreCompositorChain.cpp',
'ogre/OgreMain/src/OgreCompositorInstance.cpp',
'ogre/OgreMain/src/OgreCompositorManager.cpp',
'ogre/OgreMain/src/OgreConfigFile.cpp',
'ogre/OgreMain/src/OgreControllerManager.cpp',
'ogre/OgreMain/src/OgreConvexBody.cpp',
'ogre/OgreMain/src/OgreDataStream.cpp',
'ogre/OgreMain/src/OgreDefaultHardwareBufferManager.cpp',
'ogre/OgreMain/src/OgreDefaultSceneQueries.cpp',
'ogre/OgreMain/src/OgreDeflate.cpp',
'ogre/OgreMain/src/OgreDepthBuffer.cpp',
'ogre/OgreMain/src/OgreDistanceLodStrategy.cpp',
'ogre/OgreMain/src/OgreDualQuaternion.cpp',
'ogre/OgreMain/src/OgreDynLib.cpp',
'ogre/OgreMain/src/OgreDynLibManager.cpp',
'ogre/OgreMain/src/OgreEdgeListBuilder.cpp',
'ogre/OgreMain/src/OgreEntity.cpp',
'ogre/OgreMain/src/OgreException.cpp',
'ogre/OgreMain/src/OgreExternalTextureSource.cpp',
'ogre/OgreMain/src/OgreExternalTextureSourceManager.cpp',
'ogre/OgreMain/src/OgreFileSystem.cpp',
'ogre/OgreMain/src/OgreFont.cpp',
'ogre/OgreMain/src/OgreFontManager.cpp',
'ogre/OgreMain/src/OgreFrustum.cpp',
'ogre/OgreMain/src/OgreGpuProgram.cpp',
'ogre/OgreMain/src/OgreGpuProgramManager.cpp',
'ogre/OgreMain/src/OgreGpuProgramParams.cpp',
'ogre/OgreMain/src/OgreGpuProgramUsage.cpp',
'ogre/OgreMain/src/OgreHardwareBufferManager.cpp',
'ogre/OgreMain/src/OgreHardwareIndexBuffer.cpp',
'ogre/OgreMain/src/OgreHardwareOcclusionQuery.cpp',
'ogre/OgreMain/src/OgreHardwarePixelBuffer.cpp',
'ogre/OgreMain/src/OgreHardwareVertexBuffer.cpp',
'ogre/OgreMain/src/OgreHighLevelGpuProgram.cpp',
'ogre/OgreMain/src/OgreHighLevelGpuProgramManager.cpp',
'ogre/OgreMain/src/OgreImage.cpp',
'ogre/OgreMain/src/OgreInstanceBatch.cpp',
'ogre/OgreMain/src/OgreInstanceBatchHW.cpp',
'ogre/OgreMain/src/OgreInstanceBatchHW_VTF.cpp',
'ogre/OgreMain/src/OgreInstanceBatchShader.cpp',
'ogre/OgreMain/src/OgreInstanceBatchVTF.cpp',
'ogre/OgreMain/src/OgreInstancedGeometry.cpp',
'ogre/OgreMain/src/OgreInstancedEntity.cpp',
'ogre/OgreMain/src/OgreInstanceManager.cpp',
'ogre/OgreMain/src/OgreKeyFrame.cpp',
'ogre/OgreMain/src/OgreLight.cpp',
'ogre/OgreMain/src/OgreLodStrategy.cpp',
'ogre/OgreMain/src/OgreLodStrategyManager.cpp',
'ogre/OgreMain/src/OgreLog.cpp',
'ogre/OgreMain/src/OgreLogManager.cpp',
'ogre/OgreMain/src/OgreManualObject.cpp',
'ogre/OgreMain/src/OgreMaterial.cpp',
'ogre/OgreMain/src/OgreMaterialManager.cpp',
'ogre/OgreMain/src/OgreMaterialSerializer.cpp',
'ogre/OgreMain/src/OgreMath.cpp',
'ogre/OgreMain/src/OgreMatrix3.cpp',
'ogre/OgreMain/src/OgreMatrix4.cpp',
'ogre/OgreMain/src/OgreMemoryAllocatedObject.cpp',
'ogre/OgreMain/src/OgreMemoryNedAlloc.cpp',
'ogre/OgreMain/src/OgreMemoryNedPooling.cpp',
'ogre/OgreMain/src/OgreMemoryTracker.cpp',
'ogre/OgreMain/src/OgreMesh.cpp',
'ogre/OgreMain/src/OgreMeshManager.cpp',
'ogre/OgreMain/src/OgreMeshSerializer.cpp',
'ogre/OgreMain/src/OgreMeshSerializerImpl.cpp',
'ogre/OgreMain/src/OgreMovableObject.cpp',
'ogre/OgreMain/src/OgreMovablePlane.cpp',
'ogre/OgreMain/src/OgreNode.cpp',
'ogre/OgreMain/src/OgreNumerics.cpp',
'ogre/OgreMain/src/OgreOptimisedUtil.cpp',
'ogre/OgreMain/src/OgreOptimisedUtilGeneral.cpp',
'ogre/OgreMain/src/OgreOptimisedUtilSSE.cpp',
'ogre/OgreMain/src/OgreOverlay.cpp',
'ogre/OgreMain/src/OgreOverlayContainer.cpp',
'ogre/OgreMain/src/OgreOverlayElement.cpp',
'ogre/OgreMain/src/OgreOverlayElementCommands.cpp',
'ogre/OgreMain/src/OgreOverlayElementFactory.cpp',
'ogre/OgreMain/src/OgreOverlayManager.cpp',
'ogre/OgreMain/src/OgrePanelOverlayElement.cpp',
'ogre/OgreMain/src/OgreParticle.cpp',
'ogre/OgreMain/src/OgreParticleEmitter.cpp',
'ogre/OgreMain/src/OgreParticleEmitterCommands.cpp',
'ogre/OgreMain/src/OgreParticleIterator.cpp',
'ogre/OgreMain/src/OgreParticleSystem.cpp',
'ogre/OgreMain/src/OgreParticleSystemManager.cpp',
'ogre/OgreMain/src/OgrePass.cpp',
'ogre/OgreMain/src/OgrePatchMesh.cpp',
'ogre/OgreMain/src/OgrePatchSurface.cpp',
'ogre/OgreMain/src/OgrePixelCountLodStrategy.cpp',
'ogre/OgreMain/src/OgrePixelFormat.cpp',
'ogre/OgreMain/src/OgrePlane.cpp',
'ogre/OgreMain/src/OgrePlatformInformation.cpp',
'ogre/OgreMain/src/OgrePolygon.cpp',
'ogre/OgreMain/src/OgrePose.cpp',
'ogre/OgreMain/src/OgrePrecompiledHeaders.cpp',
'ogre/OgreMain/src/OgrePredefinedControllers.cpp',
'ogre/OgreMain/src/OgrePrefabFactory.cpp',
'ogre/OgreMain/src/OgreProfiler.cpp',
'ogre/OgreMain/src/OgreProgressiveMesh.cpp',
'ogre/OgreMain/src/OgreQuaternion.cpp',
'ogre/OgreMain/src/OgreRectangle2D.cpp',
'ogre/OgreMain/src/OgreRenderQueue.cpp',
'ogre/OgreMain/src/OgreRenderQueueInvocation.cpp',
'ogre/OgreMain/src/OgreRenderQueueSortingGrouping.cpp',
'ogre/OgreMain/src/OgreRenderSystem.cpp',
'ogre/OgreMain/src/OgreRenderSystemCapabilities.cpp',
'ogre/OgreMain/src/OgreRenderSystemCapabilitiesManager.cpp',
'ogre/OgreMain/src/OgreRenderSystemCapabilitiesSerializer.cpp',
'ogre/OgreMain/src/OgreRenderTarget.cpp',
'ogre/OgreMain/src/OgreRenderTexture.cpp',
'ogre/OgreMain/src/OgreRenderToVertexBuffer.cpp',
'ogre/OgreMain/src/OgreRenderWindow.cpp',
'ogre/OgreMain/src/OgreResource.cpp',
'ogre/OgreMain/src/OgreResourceBackgroundQueue.cpp',
'ogre/OgreMain/src/OgreResourceGroupManager.cpp',
'ogre/OgreMain/src/OgreResourceManager.cpp',
'ogre/OgreMain/src/OgreRibbonTrail.cpp',
'ogre/OgreMain/src/OgreRoot.cpp',
'ogre/OgreMain/src/OgreRotationSpline.cpp',
'ogre/OgreMain/src/OgreSceneManager.cpp',
'ogre/OgreMain/src/OgreSceneManagerEnumerator.cpp',
'ogre/OgreMain/src/OgreSceneNode.cpp',
'ogre/OgreMain/src/OgreSceneQuery.cpp',
'ogre/OgreMain/src/OgreScriptCompiler.cpp',
'ogre/OgreMain/src/OgreScriptLexer.cpp',
'ogre/OgreMain/src/OgreScriptParser.cpp',
'ogre/OgreMain/src/OgreScriptTranslator.cpp',
'ogre/OgreMain/src/OgreSerializer.cpp',
'ogre/OgreMain/src/OgreShadowCameraSetup.cpp',
'ogre/OgreMain/src/OgreShadowCameraSetupFocused.cpp',
'ogre/OgreMain/src/OgreShadowCameraSetupLiSPSM.cpp',
'ogre/OgreMain/src/OgreShadowCameraSetupPlaneOptimal.cpp',
'ogre/OgreMain/src/OgreShadowCameraSetupPSSM.cpp',
'ogre/OgreMain/src/OgreShadowCaster.cpp',
'ogre/OgreMain/src/OgreShadowTextureManager.cpp',
'ogre/OgreMain/src/OgreShadowVolumeExtrudeProgram.cpp',
'ogre/OgreMain/src/OgreSimpleRenderable.cpp',
'ogre/OgreMain/src/OgreSimpleSpline.cpp',
'ogre/OgreMain/src/OgreSkeleton.cpp',
'ogre/OgreMain/src/OgreSkeletonInstance.cpp',
'ogre/OgreMain/src/OgreSkeletonManager.cpp',
'ogre/OgreMain/src/OgreSkeletonSerializer.cpp',
'ogre/OgreMain/src/OgreSmallVector.cpp',
'ogre/OgreMain/src/OgreStaticGeometry.cpp',
'ogre/OgreMain/src/OgreStreamSerialiser.cpp',
'ogre/OgreMain/src/OgreString.cpp',
'ogre/OgreMain/src/OgreStringConverter.cpp',
'ogre/OgreMain/src/OgreStringInterface.cpp',
'ogre/OgreMain/src/OgreSubEntity.cpp',
'ogre/OgreMain/src/OgreSubMesh.cpp',
'ogre/OgreMain/src/OgreTagPoint.cpp',
'ogre/OgreMain/src/OgreTangentSpaceCalc.cpp',
'ogre/OgreMain/src/OgreTechnique.cpp',
'ogre/OgreMain/src/OgreTextAreaOverlayElement.cpp',
'ogre/OgreMain/src/OgreTexture.cpp',
'ogre/OgreMain/src/OgreTextureManager.cpp',
'ogre/OgreMain/src/OgreTextureUnitState.cpp',
'ogre/OgreMain/src/OgreUnifiedHighLevelGpuProgram.cpp',
'ogre/OgreMain/src/OgreUserObjectBindings.cpp',
'ogre/OgreMain/src/OgreUTFString.cpp',
'ogre/OgreMain/src/OgreVector2.cpp',
'ogre/OgreMain/src/OgreVector3.cpp',
'ogre/OgreMain/src/OgreVector4.cpp',
'ogre/OgreMain/src/OgreVertexIndexData.cpp',
'ogre/OgreMain/src/OgreViewport.cpp',
'ogre/OgreMain/src/OgreWindowEventUtilities.cpp',
'ogre/OgreMain/src/OgreWireBoundingBox.cpp',
'ogre/OgreMain/src/OgreWorkQueue.cpp',
'ogre/OgreMain/src/OgreDDSCodec.cpp',
'ogre/OgreMain/src/ewol/OgreConfigDialog.cpp',
'ogre/OgreMain/src/ewol/OgreErrorDialog.cpp',
'ogre/OgreMain/src/ewol/OgreTimer.cpp',
'ogre/OgreMain/src/OgreSearchOps.cpp',
'ogre/OgreMain/src/Threading/OgreDefaultWorkQueueStandard.cpp',])
# add the currrent module at the
return myModule

View File

@ -1,51 +0,0 @@
#!/usr/bin/python
# --------------------------------------------------------
# -- Ogre_main librairy
# --------------------------------------------------------
import lutinModule
import lutinTools
def Create(target):
myModule = lutinModule.module(__file__, 'ogre_paging', 'LIBRARY')
myModule.AddModuleDepend(['ogre_main'])
myModule.CompileFlags_CC([
'-DOgrePaging_EXPORTS',
'-D_MT',
'-D_USRDLL',
'-msse',
'-Wno-deprecated',
'-Wall',
'-Wctor-dtor-privacy',
'-Winit-self',
'-Wno-overloaded-virtual',
'-Wcast-qual',
'-Wwrite-strings',
'-Wextra',
'-Wno-unused-parameter',
'-pedantic',
'-Wshadow',
'-Wno-missing-field-initializers',
'-Wno-long-long',
'-Wno-unused-but-set-parameter',
'-O2',
'-DNDEBUG'])
myModule.AddExportPath(lutinTools.GetCurrentPath(__file__)+"/ogre/Components/Paging/include")
myModule.AddSrcFile([
'ogre/Components/Paging/src/OgreGrid2DPageStrategy.cpp',
'ogre/Components/Paging/src/OgreGrid3DPageStrategy.cpp',
'ogre/Components/Paging/src/OgrePage.cpp',
'ogre/Components/Paging/src/OgrePageContent.cpp',
'ogre/Components/Paging/src/OgrePageContentCollection.cpp',
'ogre/Components/Paging/src/OgrePagedWorld.cpp',
'ogre/Components/Paging/src/OgrePagedWorldSection.cpp',
'ogre/Components/Paging/src/OgrePageManager.cpp',
'ogre/Components/Paging/src/OgreSimplePageContentCollection.cpp'])
# add the currrent module at the
return myModule

View File

@ -1,49 +0,0 @@
#!/usr/bin/python
# --------------------------------------------------------
# -- Ogre_main librairy
# --------------------------------------------------------
import lutinModule
import lutinTools
def Create(target):
myModule = lutinModule.module(__file__, 'ogre_plugin_BSPSceneManager', 'LIBRARY')
myModule.AddModuleDepend(['ogre_main'])
myModule.CompileFlags_CC([
'-DPlugin_BSPSceneManager_EXPORTS',
'-msse',
'-Wno-deprecated',
'-Wall',
'-Wctor-dtor-privacy',
'-Winit-self',
'-Wno-overloaded-virtual',
'-Wcast-qual',
'-Wwrite-strings',
'-Wextra',
'-Wno-unused-parameter',
'-pedantic',
'-Wshadow',
'-Wno-missing-field-initializers',
'-Wno-long-long',
'-Wno-unused-but-set-parameter',
'-O2',
'-DNDEBUG'])
myModule.AddExportPath(lutinTools.GetCurrentPath(__file__)+"/ogre/PlugIns/BSPSceneManager/include")
myModule.AddSrcFile([
'ogre/PlugIns/BSPSceneManager/src/OgreBspLevel.cpp',
'ogre/PlugIns/BSPSceneManager/src/OgreBspNode.cpp',
'ogre/PlugIns/BSPSceneManager/src/OgreBspResourceManager.cpp',
'ogre/PlugIns/BSPSceneManager/src/OgreBspSceneManager.cpp',
'ogre/PlugIns/BSPSceneManager/src/OgreBspSceneManagerDll.cpp',
'ogre/PlugIns/BSPSceneManager/src/OgreBspSceneManagerPlugin.cpp',
'ogre/PlugIns/BSPSceneManager/src/OgreBspSceneNode.cpp',
'ogre/PlugIns/BSPSceneManager/src/OgreQuake3Level.cpp',
'ogre/PlugIns/BSPSceneManager/src/OgreQuake3Shader.cpp',
'ogre/PlugIns/BSPSceneManager/src/OgreQuake3ShaderManager.cpp'])
# add the currrent module at the
return myModule

View File

@ -1,49 +0,0 @@
#!/usr/bin/python
# --------------------------------------------------------
# -- Ogre_main librairy
# --------------------------------------------------------
import lutinModule
import lutinTools
def Create(target):
myModule = lutinModule.module(__file__, 'ogre_plugin_OctreeSceneManager', 'LIBRARY')
myModule.AddModuleDepend(['ogre_main'])
myModule.CompileFlags_CC([
'-DPlugin_OctreeSceneManager_EXPORTS',
'-msse',
'-Wno-deprecated',
'-Wall',
'-Wctor-dtor-privacy',
'-Winit-self',
'-Wno-overloaded-virtual',
'-Wcast-qual',
'-Wwrite-strings',
'-Wextra',
'-Wno-unused-parameter',
'-pedantic',
'-Wshadow',
'-Wno-missing-field-initializers',
'-Wno-long-long',
'-Wno-unused-but-set-parameter',
'-O2',
'-DNDEBUG'])
myModule.AddExportPath(lutinTools.GetCurrentPath(__file__)+"/ogre/PlugIns/OctreeSceneManager/include")
myModule.AddSrcFile([
'ogre/PlugIns/OctreeSceneManager/src/OgreOctree.cpp',
'ogre/PlugIns/OctreeSceneManager/src/OgreOctreeCamera.cpp',
'ogre/PlugIns/OctreeSceneManager/src/OgreOctreeNode.cpp',
'ogre/PlugIns/OctreeSceneManager/src/OgreOctreePlugin.cpp',
'ogre/PlugIns/OctreeSceneManager/src/OgreOctreeSceneManager.cpp',
'ogre/PlugIns/OctreeSceneManager/src/OgreOctreeSceneManagerDll.cpp',
'ogre/PlugIns/OctreeSceneManager/src/OgreOctreeSceneQuery.cpp'])
# add the currrent module at the
return myModule

View File

@ -1,43 +0,0 @@
#!/usr/bin/python
# --------------------------------------------------------
# -- Ogre_main librairy
# --------------------------------------------------------
import lutinModule
import lutinTools
def Create(target):
myModule = lutinModule.module(__file__, 'ogre_plugin_OctreeZone', 'LIBRARY')
myModule.AddModuleDepend(['ogre_main', 'ogre_plugin_PCZSceneManager'])
myModule.CompileFlags_CC([
'-DPlugin_OctreeZone_EXPORTS',
'-msse',
'-Wno-deprecated',
'-Wall',
'-Wctor-dtor-privacy',
'-Winit-self',
'-Wno-overloaded-virtual',
'-Wcast-qual',
'-Wwrite-strings',
'-Wextra',
'-Wno-unused-parameter',
'-pedantic',
'-Wshadow',
'-Wno-missing-field-initializers',
'-Wno-long-long',
'-Wno-unused-but-set-parameter',
'-O2',
'-DNDEBUG'])
myModule.AddExportPath(lutinTools.GetCurrentPath(__file__)+"/ogre/PlugIns/OctreeZone/include")
myModule.AddSrcFile([
'ogre/PlugIns/OctreeZone/src/OgreOctreeZone.cpp',
'ogre/PlugIns/OctreeZone/src/OgreOctreeZoneDll.cpp',
'ogre/PlugIns/OctreeZone/src/OgreOctreeZoneOctree.cpp',
'ogre/PlugIns/OctreeZone/src/OgreOctreeZonePlugin.cpp'])
# add the currrent module at the
return myModule

View File

@ -1,58 +0,0 @@
#!/usr/bin/python
# --------------------------------------------------------
# -- Ogre_main librairy
# --------------------------------------------------------
import lutinModule
import lutinTools
def Create(target):
myModule = lutinModule.module(__file__, 'ogre_plugin_PCZSceneManager', 'LIBRARY')
myModule.AddModuleDepend(['ogre_main'])
myModule.CompileFlags_CC([
'-DPlugin_PCZSceneManager_EXPORTS',
'-msse',
'-Wno-deprecated',
'-Wall',
'-Wctor-dtor-privacy',
'-Winit-self',
'-Wno-overloaded-virtual',
'-Wcast-qual',
'-Wwrite-strings',
'-Wextra',
'-Wno-unused-parameter',
'-pedantic',
'-Wshadow',
'-Wno-missing-field-initializers',
'-Wno-long-long',
'-Wno-unused-but-set-parameter',
'-O2',
'-DNDEBUG'])
myModule.AddExportPath(lutinTools.GetCurrentPath(__file__)+"/ogre/PlugIns/PCZSceneManager/include")
myModule.AddSrcFile([
'ogre/PlugIns/PCZSceneManager/src/OgreAntiPortal.cpp',
'ogre/PlugIns/PCZSceneManager/src/OgreCapsule.cpp',
'ogre/PlugIns/PCZSceneManager/src/OgreDefaultZone.cpp',
'ogre/PlugIns/PCZSceneManager/src/OgrePCPlane.cpp',
'ogre/PlugIns/PCZSceneManager/src/OgrePCZCamera.cpp',
'ogre/PlugIns/PCZSceneManager/src/OgrePCZFrustum.cpp',
'ogre/PlugIns/PCZSceneManager/src/OgrePCZLight.cpp',
'ogre/PlugIns/PCZSceneManager/src/OgrePCZone.cpp',
'ogre/PlugIns/PCZSceneManager/src/OgrePCZoneFactory.cpp',
'ogre/PlugIns/PCZSceneManager/src/OgrePCZPlugin.cpp',
'ogre/PlugIns/PCZSceneManager/src/OgrePCZSceneManager.cpp',
'ogre/PlugIns/PCZSceneManager/src/OgrePCZSceneManagerDll.cpp',
'ogre/PlugIns/PCZSceneManager/src/OgrePCZSceneNode.cpp',
'ogre/PlugIns/PCZSceneManager/src/OgrePCZSceneQuery.cpp',
'ogre/PlugIns/PCZSceneManager/src/OgrePortal.cpp',
'ogre/PlugIns/PCZSceneManager/src/OgrePortalBase.cpp',
'ogre/PlugIns/PCZSceneManager/src/OgreSegment.cpp'])
# add the currrent module at the
return myModule
#/usr/bin/c++ -fPIC -msse -Wno-deprecated -Wall -Wctor-dtor-privacy -Winit-self -Wno-overloaded-virtual -Wcast-qual -Wwrite-strings -Wextra -Wno-unused-parameter -pedantic -Wshadow -Wno-missing-field-initializers -Wno-long-long -Wno-unused-but-set-parameter -O2 -g -DNDEBUG -shared -Wl,-soname,Plugin_PCZSceneManager.so.1.8.2 -o ../../lib/Plugin_PCZSceneManager.so.1.8.2 CMakeFiles/Plugin_PCZSceneManager.dir/src/OgreAntiPortal.cpp.o CMakeFiles/Plugin_PCZSceneManager.dir/src/OgreCapsule.cpp.o CMakeFiles/Plugin_PCZSceneManager.dir/src/OgreDefaultZone.cpp.o CMakeFiles/Plugin_PCZSceneManager.dir/src/OgrePCPlane.cpp.o CMakeFiles/Plugin_PCZSceneManager.dir/src/OgrePCZCamera.cpp.o CMakeFiles/Plugin_PCZSceneManager.dir/src/OgrePCZFrustum.cpp.o CMakeFiles/Plugin_PCZSceneManager.dir/src/OgrePCZLight.cpp.o CMakeFiles/Plugin_PCZSceneManager.dir/src/OgrePCZone.cpp.o CMakeFiles/Plugin_PCZSceneManager.dir/src/OgrePCZoneFactory.cpp.o CMakeFiles/Plugin_PCZSceneManager.dir/src/OgrePCZPlugin.cpp.o CMakeFiles/Plugin_PCZSceneManager.dir/src/OgrePCZSceneManager.cpp.o CMakeFiles/Plugin_PCZSceneManager.dir/src/OgrePCZSceneManagerDll.cpp.o CMakeFiles/Plugin_PCZSceneManager.dir/src/OgrePCZSceneNode.cpp.o CMakeFiles/Plugin_PCZSceneManager.dir/src/OgrePCZSceneQuery.cpp.o CMakeFiles/Plugin_PCZSceneManager.dir/src/OgrePortal.cpp.o CMakeFiles/Plugin_PCZSceneManager.dir/src/OgrePortalBase.cpp.o CMakeFiles/Plugin_PCZSceneManager.dir/src/OgreSegment.cpp.o ../../lib/libOgreMain.so.1.8.2 -lfreetype -lSM -lICE -lX11 -lXext -lXt -lXaw -lpthread -ldl -Wl,-rpath,ogre/lib:

View File

@ -1,57 +0,0 @@
#!/usr/bin/python
# --------------------------------------------------------
# -- Ogre_main librairy
# --------------------------------------------------------
import lutinModule
import lutinTools
def Create(target):
myModule = lutinModule.module(__file__, 'ogre_plugin_particuleFX', 'LIBRARY')
myModule.AddModuleDepend(['ogre_main'])
myModule.CompileFlags_CC([
'-DPlugin_ParticleFX_EXPORTS',
'-msse',
'-Wno-deprecated',
'-Wall',
'-Wctor-dtor-privacy',
'-Winit-self',
'-Wno-overloaded-virtual',
'-Wcast-qual',
'-Wwrite-strings',
'-Wextra',
'-Wno-unused-parameter',
'-pedantic',
'-Wshadow',
'-Wno-missing-field-initializers',
'-Wno-long-long -Wno-unused-but-set-parameter',
'-O2',
'-DNDEBUG'])
myModule.AddExportPath(lutinTools.GetCurrentPath(__file__)+"/ogre/PlugIns/ParticleFX/include")
myModule.AddSrcFile([
'ogre/PlugIns/ParticleFX/src/OgreAreaEmitter.cpp',
'ogre/PlugIns/ParticleFX/src/OgreBoxEmitter.cpp',
'ogre/PlugIns/ParticleFX/src/OgreColourFaderAffector2.cpp',
'ogre/PlugIns/ParticleFX/src/OgreColourFaderAffector.cpp',
'ogre/PlugIns/ParticleFX/src/OgreColourImageAffector.cpp',
'ogre/PlugIns/ParticleFX/src/OgreColourInterpolatorAffector.cpp',
'ogre/PlugIns/ParticleFX/src/OgreCylinderEmitter.cpp',
'ogre/PlugIns/ParticleFX/src/OgreDeflectorPlaneAffector.cpp',
'ogre/PlugIns/ParticleFX/src/OgreDirectionRandomiserAffector.cpp',
'ogre/PlugIns/ParticleFX/src/OgreEllipsoidEmitter.cpp',
'ogre/PlugIns/ParticleFX/src/OgreHollowEllipsoidEmitter.cpp',
'ogre/PlugIns/ParticleFX/src/OgreLinearForceAffector.cpp',
'ogre/PlugIns/ParticleFX/src/OgreParticleFX.cpp',
'ogre/PlugIns/ParticleFX/src/OgreParticleFXPlugin.cpp',
'ogre/PlugIns/ParticleFX/src/OgrePointEmitter.cpp',
'ogre/PlugIns/ParticleFX/src/OgreRingEmitter.cpp',
'ogre/PlugIns/ParticleFX/src/OgreRotationAffector.cpp',
'ogre/PlugIns/ParticleFX/src/OgreScaleAffector.cpp'])
# add the currrent module at the
return myModule

View File

@ -1,50 +0,0 @@
#!/usr/bin/python
# --------------------------------------------------------
# -- Ogre_main librairy
# --------------------------------------------------------
import lutinModule
import lutinTools
def Create(target):
myModule = lutinModule.module(__file__, 'ogre_terrain', 'LIBRARY')
myModule.AddModuleDepend(['ogre_main', 'ogre_paging'])
myModule.CompileFlags_CC([
'-DOgreTerrain_EXPORTS',
'-D_MT',
'-D_USRDLL',
'-msse',
'-Wno-deprecated',
'-Wall',
'-Wctor-dtor-privacy',
'-Winit-self',
'-Wno-overloaded-virtual',
'-Wcast-qual',
'-Wwrite-strings',
'-Wextra',
'-Wno-unused-parameter',
'-pedantic',
'-Wshadow',
'-Wno-missing-field-initializers',
'-Wno-long-long',
'-Wno-unused-but-set-parameter',
'-O2',
'-DNDEBUG'])
myModule.AddExportPath(lutinTools.GetCurrentPath(__file__)+"/ogre/Components/Terrain/include")
myModule.AddSrcFile([
'ogre/Components/Terrain/src/OgreTerrain.cpp',
'ogre/Components/Terrain/src/OgreTerrainGroup.cpp',
'ogre/Components/Terrain/src/OgreTerrainLayerBlendMap.cpp',
'ogre/Components/Terrain/src/OgreTerrainMaterialGenerator.cpp',
'ogre/Components/Terrain/src/OgreTerrainMaterialGeneratorA.cpp',
'ogre/Components/Terrain/src/OgreTerrainQuadTreeNode.cpp',
'ogre/Components/Terrain/src/OgreTerrainPaging.cpp',
'ogre/Components/Terrain/src/OgreTerrainPagedWorldSection.cpp'])
# add the currrent module at the
return myModule

View File

@ -15,7 +15,7 @@
ewol::Area::Area(const ivec2& _size) :
m_position(0.0, 0.0, 0.0),
m_color(draw::color::white),
m_color(etk::color::white),
m_GLprogram(NULL),
m_GLPosition(-1),
m_GLMatrix(-1),

View File

@ -18,8 +18,8 @@ namespace ewol
class Area : public ewol::Compositing
{
private:
vec3 m_position; //!< The current position to draw
draw::Color m_color; //!< The text foreground color
vec3 m_position; //!< The current position to draw
etk::Color<> m_color; //!< The text foreground color
private:
ewol::Program* m_GLprogram; //!< pointer on the opengl display program
int32_t m_GLPosition; //!< openGL id on the element (vertex buffer)
@ -28,10 +28,10 @@ namespace ewol
int32_t m_GLtexture; //!< openGL id on the element (Texture position)
int32_t m_GLtexID; //!< openGL id on the element (texture ID)
private:
ewol::Texture* m_resource; //!< texture resources
etk::Vector<vec3 > m_coord; //!< internal coord of the object
etk::Vector<vec2 > m_coordTex; //!< internal texture coordinate for every point
etk::Vector<draw::Colorf> m_coordColor; //!< internal color of the different point
ewol::Texture* m_resource; //!< texture resources
etk::Vector<vec3 > m_coord; //!< internal coord of the object
etk::Vector<vec2 > m_coordTex; //!< internal texture coordinate for every point
etk::Vector<etk::Color<float> > m_coordColor; //!< internal color of the different point
private:
/**
* @brief Load the openGL program and get all the ID needed
@ -79,7 +79,7 @@ namespace ewol
*/
void Print(const ivec2& _size);
draw::Image& Get(void) { return m_resource->Get(); };
egami::Image& Get(void) { return m_resource->Get(); };
void Flush(void) { m_resource->Flush(); };
};

View File

@ -222,8 +222,8 @@ ewol::Drawing::Drawing(void) :
m_clippingPosStart(0.0, 0.0, 0.0),
m_clippingPosStop(0.0, 0.0, 0.0),
m_clippingEnable(false),
m_color(draw::color::black),
m_colorBg(draw::color::none),
m_color(etk::color::black),
m_colorBg(etk::color::none),
m_GLprogram(NULL),
m_GLPosition(-1),
m_GLMatrix(-1),
@ -257,7 +257,7 @@ void ewol::Drawing::GenerateTriangle(void)
m_coordColor.PushBack(m_tricolor[2]);
}
void ewol::Drawing::InternalSetColor(const draw::Color& _color)
void ewol::Drawing::InternalSetColor(const etk::Color<>& _color)
{
if (m_triElement < 1) {
m_tricolor[0] = _color;
@ -346,8 +346,8 @@ void ewol::Drawing::Clear(void)
m_clippingPosStop = vec3(0.0, 0.0, 0.0);
m_clippingEnable = false;
m_color = draw::color::black;
m_colorBg = draw::color::none;
m_color = etk::color::black;
m_colorBg = etk::color::none;
for (int32_t iii=0; iii<3; iii++) {
m_triangle[iii] = m_position;
@ -510,7 +510,7 @@ void ewol::Drawing::Circle(float _radius, float _angleStart, float _angleStop)
}
// display background :
if (m_colorBg.a!=0) {
if (m_colorBg.a()!=0) {
InternalSetColor(m_colorBg);
for (int32_t iii=0; iii<nbOcurence; iii++) {
SetPoint(vec3(m_position.x(),
@ -537,7 +537,7 @@ void ewol::Drawing::Circle(float _radius, float _angleStart, float _angleStop)
// show if we have a border :
if( m_thickness==0
|| m_color.a==0) {
|| m_color.a()==0) {
return;
}
InternalSetColor(m_color);

View File

@ -9,7 +9,7 @@
#ifndef __EWOL_COMPOSITING_DRAWING_H__
#define __EWOL_COMPOSITING_DRAWING_H__
#include <draw/Color.h>
#include <etk/Color.h>
#include <ewol/debug.h>
#include <ewol/compositing/Compositing.h>
@ -26,16 +26,16 @@ namespace ewol
vec3 m_clippingPosStop; //!< Clipping stop position
bool m_clippingEnable; //!< true if the clipping must be activated
private:
draw::Color m_color; //!< The text foreground color
draw::Color m_colorBg; //!< The text background color
etk::Color<> m_color; //!< The text foreground color
etk::Color<> m_colorBg; //!< The text background color
private:
ewol::Program* m_GLprogram; //!< pointer on the opengl display program
int32_t m_GLPosition; //!< openGL id on the element (vertex buffer)
int32_t m_GLMatrix; //!< openGL id on the element (transformation matrix)
int32_t m_GLColor; //!< openGL id on the element (color buffer)
private: // Background Color (display only when needed)
etk::Vector<vec3 > m_coord; //!< internal position for the text display
etk::Vector<draw::Colorf> m_coordColor; //!< internal color of the background
etk::Vector<vec3 > m_coord; //!< internal position for the text display
etk::Vector<etk::Color<float> > m_coordColor; //!< internal color of the background
public:
/**
* @brief Basic constructor
@ -57,7 +57,7 @@ namespace ewol
float m_thickness; //!< when drawing line and other things
int32_t m_triElement; //!< special counter of the single dot generated
vec3 m_triangle[3]; //!< Register every system with a combinaison of tiangle
draw::Colorf m_tricolor[3]; //!< Register every the associated color foreground
etk::Color<float> m_tricolor[3]; //!< Register every the associated color foreground
// internal API for the generation abstraction of triangles
/**
* @brief Lunch the generation of triangle
@ -71,7 +71,7 @@ namespace ewol
* @brief Set the Color of the current triangle drawing
* @param[in] _color Color to current dots generated
*/
void InternalSetColor(const draw::Color& _color);
void InternalSetColor(const etk::Color<>& _color);
/**
* @brief internal add of the specific point
* @param[in] _point The requeste dpoint to add
@ -108,12 +108,12 @@ namespace ewol
* @brief Set the Color of the current foreground font
* @param[in] _color Color to set on foreground (for next print)
*/
void SetColor(const draw::Color& _color) { m_color = _color; };
void SetColor(const etk::Color<>& _color) { m_color = _color; };
/**
* @brief Set the background color of the font (for selected Text (not the global BG))
* @param[in] _color Color to set on background (for next print)
*/
void SetColorBg(const draw::Color& _color) { m_colorBg = _color; };
void SetColorBg(const etk::Color<>& _color) { m_colorBg = _color; };
/**
* @brief Request a clipping area for the text (next draw only)
* @param[in]_ pos Start position of the clipping

View File

@ -18,7 +18,7 @@ ewol::Image::Image(const etk::UString& _imageName) :
m_clippingPosStart(0.0, 0.0, 0.0),
m_clippingPosStop(0.0, 0.0, 0.0),
m_clippingEnable(false),
m_color(draw::color::white),
m_color(etk::color::white),
m_axes(0.0, 0.0, 0.0),
m_angle(0.0),
m_GLprogram(NULL),
@ -100,7 +100,7 @@ void ewol::Image::Clear(void)
m_clippingPosStart = vec3(0.0, 0.0, 0.0);
m_clippingPosStop = vec3(0.0, 0.0, 0.0);
m_clippingEnable = false;
m_color = draw::color::white;
m_color = etk::color::white;
m_axes = vec3(0.0, 0.0, 0.0);
m_angle = 0.0;
}

View File

@ -23,7 +23,7 @@ namespace ewol
vec3 m_clippingPosStop; //!< Clipping stop position
bool m_clippingEnable; //!< true if the clipping must be activated
private:
draw::Color m_color; //!< The text foreground color
etk::Color<> m_color; //!< The text foreground color
vec3 m_axes; //!< Rotation axes (instant)
float m_angle; //!< Angle to set at the axes
private:
@ -37,7 +37,7 @@ namespace ewol
ewol::TextureFile* m_resource; //!< texture resources
etk::Vector<vec3 > m_coord; //!< internal coord of the object
etk::Vector<vec2 > m_coordTex; //!< internal texture coordinate for every point
etk::Vector<draw::Colorf> m_coordColor; //!< internal color of the different point
etk::Vector<etk::Color<float> > m_coordColor; //!< internal color of the different point
private:
/**
* @brief Load the openGL program and get all the ID needed
@ -83,7 +83,7 @@ namespace ewol
* @brief Set the Color of the current foreground font
* @param[in] _color Color to set on foreground (for next print)
*/
void SetColor(const draw::Color& _color) { m_color = _color; };
void SetColor(const etk::Color<>& _color) { m_color = _color; };
/**
* @brief Request a clipping area for the text (next draw only)
* @param[in] _pos Start position of the clipping

View File

@ -19,10 +19,10 @@ ewol::Text::Text(void) :
m_clippingPosStart(0.0, 0.0, 0.0),
m_clippingPosStop(0.0, 0.0, 0.0),
m_clippingEnable(false),
m_color(draw::color::black),
m_colorBg(draw::color::none),
m_colorCursor(draw::color::black),
m_colorSelection(draw::color::olive),
m_color(etk::color::black),
m_colorBg(etk::color::none),
m_colorCursor(etk::color::black),
m_colorSelection(etk::color::olive),
m_mode(ewol::font::Regular),
m_kerning(true),
m_distanceField(false),
@ -50,10 +50,10 @@ ewol::Text::Text(const etk::UString& _fontName, int32_t _fontSize) :
m_clippingPosStart(0.0, 0.0, 0.0),
m_clippingPosStop(0.0, 0.0, 0.0),
m_clippingEnable(false),
m_color(draw::color::black),
m_colorBg(draw::color::none),
m_colorCursor(draw::color::black),
m_colorSelection(draw::color::olive),
m_color(etk::color::black),
m_colorBg(etk::color::none),
m_colorCursor(etk::color::black),
m_colorSelection(etk::color::olive),
m_mode(ewol::font::Regular),
m_kerning(true),
m_distanceField(false),
@ -224,8 +224,8 @@ void ewol::Text::Reset(void)
m_sizeDisplayStop = m_position;
m_nbCharDisplayed = 0;
m_clippingEnable = false;
m_color = draw::color::black;
m_colorBg = draw::color::none;
m_color = etk::color::black;
m_colorBg = etk::color::none;
m_mode = ewol::font::Regular;
m_previousCharcode = 0;
m_startTextpos = 0;
@ -278,7 +278,7 @@ void ewol::Text::SetRelPos(const vec3& _pos)
m_vectorialDraw.SetPos(m_position);
}
void ewol::Text::SetColorBg(const draw::Color& _color)
void ewol::Text::SetColorBg(const etk::Color<>& _color)
{
m_colorBg = _color;
m_vectorialDraw.SetColor(_color);
@ -470,13 +470,9 @@ void ewol::Text::ParseHtmlNode(exml::Element* _element)
EWOL_VERBOSE("XML Font ...");
TextDecoration tmpDeco = m_htmlDecoTmp;
etk::UString colorValue = elem->GetAttribute("color");
if (colorValue.Size()!=0) {
draw::ParseColor(colorValue.c_str(), m_htmlDecoTmp.m_colorFg);
}
m_htmlDecoTmp.m_colorFg = colorValue;
colorValue = elem->GetAttribute("colorBg");
if (colorValue.Size()!=0) {
draw::ParseColor(colorValue.c_str(), m_htmlDecoTmp.m_colorBg);
}
m_htmlDecoTmp.m_colorBg = colorValue;
ParseHtmlNode(elem);
m_htmlDecoTmp = tmpDeco;
} else if( true==elem->GetValue().CompareNoCase("b")
@ -553,8 +549,8 @@ void ewol::Text::PrintHTML(const etk::UString& _text)
exml::Document doc;
// reset parameter :
m_htmlDecoTmp.m_colorBg = draw::color::none;
m_htmlDecoTmp.m_colorFg = draw::color::black;
m_htmlDecoTmp.m_colorBg = etk::color::none;
m_htmlDecoTmp.m_colorFg = etk::color::black;
m_htmlDecoTmp.m_mode = ewol::font::Regular;
if (false == doc.Parse(_text)) {
@ -583,8 +579,8 @@ void ewol::Text::Print(const etk::UString& _text, const etk::Vector<TextDecorati
EWOL_ERROR("Font Id is not corectly defined");
return;
}
draw::Color tmpFg(m_color);
draw::Color tmpBg(m_colorBg);
etk::Color<> tmpFg(m_color);
etk::Color<> tmpBg(m_colorBg);
if (m_alignement == ewol::Text::alignDisable) {
//EWOL_DEBUG(" 1 print in not alligned mode : start=" << m_sizeDisplayStart << " stop=" << m_sizeDisplayStop << " pos=" << m_position);
// display the cursor if needed (if it is at the start position...)
@ -617,7 +613,7 @@ void ewol::Text::Print(const etk::UString& _text, const etk::Vector<TextDecorati
}
}
if( true == m_needDisplay
&& m_colorBg.a != 0) {
&& m_colorBg.a() != 0) {
vec3 pos = m_position;
m_vectorialDraw.SetPos(pos);
Print(_text[iii]);
@ -712,7 +708,7 @@ void ewol::Text::Print(const etk::UString& _text, const etk::Vector<TextDecorati
if (_text[iii] == etk::UniChar(' ')) {
//EWOL_DEBUG(" generateString : \" \"");
if( true == m_needDisplay
&& m_colorBg.a != 0) {
&& m_colorBg.a() != 0) {
m_vectorialDraw.SetPos(m_position);
}
// Must generate a dynamic space :
@ -720,13 +716,13 @@ void ewol::Text::Print(const etk::UString& _text, const etk::Vector<TextDecorati
m_position.y(),
m_position.z()) );
if( true == m_needDisplay
&& m_colorBg.a != 0) {
&& m_colorBg.a() != 0) {
m_vectorialDraw.RectangleWidth(vec3(interpolation,fontHeigh,0.0f) );
}
} else {
//EWOL_DEBUG(" generateString : \"" << (char)text[iii] << "\"");
if( true == m_needDisplay
&& m_colorBg.a != 0) {
&& m_colorBg.a() != 0) {
vec3 pos = m_position;
m_vectorialDraw.SetPos(pos);
Print(_text[iii]);
@ -1178,12 +1174,12 @@ void ewol::Text::SetCursorSelection(int32_t _cursorPos, int32_t _selectionStartP
m_cursorPos = _cursorPos;
}
void ewol::Text::SetSelectionColor(const draw::Color& _color)
void ewol::Text::SetSelectionColor(const etk::Color<>& _color)
{
m_colorSelection = _color;
}
void ewol::Text::SetCursorColor(const draw::Color& _color)
void ewol::Text::SetCursorColor(const etk::Color<>& _color)
{
m_colorCursor = _color;
}

View File

@ -9,7 +9,7 @@
#ifndef __EWOL_COMPOSITING_TEXT_H__
#define __EWOL_COMPOSITING_TEXT_H__
#include <draw/Color.h>
#include <etk/Color.h>
#include <ewol/debug.h>
#include <ewol/compositing/Compositing.h>
@ -25,13 +25,13 @@ namespace ewol
class TextDecoration
{
public:
draw::Color m_colorBg; //!< Display background color
draw::Color m_colorFg; //!< Display foreground color
ewol::font::mode_te m_mode; //!< Display mode Regular/Bold/Italic/BoldItalic
etk::Color<> m_colorBg; //!< Display background color
etk::Color<> m_colorFg; //!< Display foreground color
ewol::font::mode_te m_mode; //!< Display mode Regular/Bold/Italic/BoldItalic
TextDecoration(void)
{
m_colorBg = draw::color::blue;
m_colorBg = draw::color::green;
m_colorBg = etk::color::blue;
m_colorBg = etk::color::green;
m_mode = ewol::font::Regular;
}
@ -50,44 +50,44 @@ namespace ewol
private:
ewol::Drawing m_vectorialDraw; //!< This is used to draw background selection and other things ...
private:
int32_t m_nbCharDisplayed; //!< prevent some error in calculation size.
vec3 m_sizeDisplayStart; //!< The start windows of the display.
vec3 m_sizeDisplayStop; //!< The end windows of the display.
bool m_needDisplay; //!< This just need the display and not the size rendering.
vec3 m_position; //!< The current position to draw
vec3 m_clippingPosStart; //!< Clipping start position
vec3 m_clippingPosStop; //!< Clipping stop position
bool m_clippingEnable; //!< true if the clipping must be activated
int32_t m_nbCharDisplayed; //!< prevent some error in calculation size.
vec3 m_sizeDisplayStart; //!< The start windows of the display.
vec3 m_sizeDisplayStop; //!< The end windows of the display.
bool m_needDisplay; //!< This just need the display and not the size rendering.
vec3 m_position; //!< The current position to draw
vec3 m_clippingPosStart; //!< Clipping start position
vec3 m_clippingPosStop; //!< Clipping stop position
bool m_clippingEnable; //!< true if the clipping must be activated
private:
draw::Color m_color; //!< The text foreground color
draw::Color m_colorBg; //!< The text background color
draw::Color m_colorCursor; //!< The text cursor color
draw::Color m_colorSelection; //!< The text Selection color
etk::Color<> m_color; //!< The text foreground color
etk::Color<> m_colorBg; //!< The text background color
etk::Color<> m_colorCursor; //!< The text cursor color
etk::Color<> m_colorSelection; //!< The text Selection color
private:
ewol::font::mode_te m_mode; //!< font display property : Regular/Bold/Italic/BoldItalic
bool m_kerning; //!< Kerning enable or disable on the next elements displayed
bool m_distanceField; //!< Texture in distance Field mode ==> maybe move this in the font property.
uniChar_t m_previousCharcode; //!< we remember the previous charcode to perform the kerning. @ref Kerning
ewol::font::mode_te m_mode; //!< font display property : Regular/Bold/Italic/BoldItalic
bool m_kerning; //!< Kerning enable or disable on the next elements displayed
bool m_distanceField; //!< Texture in distance Field mode ==> maybe move this in the font property.
uniChar_t m_previousCharcode; //!< we remember the previous charcode to perform the kerning. @ref Kerning
private:
float m_startTextpos; //!< start position of the Alignement (when \n the text return at this position)
float m_stopTextPos; //!< end of the alignement (when a string is too hight it cut at the word previously this virtual line and the center is perform with this one)
aligneMode_te m_alignement; //!< Current Alignement mode (justify/left/right ...)
float m_startTextpos; //!< start position of the Alignement (when \n the text return at this position)
float m_stopTextPos; //!< end of the alignement (when a string is too hight it cut at the word previously this virtual line and the center is perform with this one)
aligneMode_te m_alignement; //!< Current Alignement mode (justify/left/right ...)
private:
ewol::Program* m_GLprogram; //!< pointer on the opengl display program
int32_t m_GLPosition; //!< openGL id on the element (vertex buffer)
int32_t m_GLMatrix; //!< openGL id on the element (transformation matrix)
int32_t m_GLColor; //!< openGL id on the element (color buffer)
int32_t m_GLtexture; //!< openGL id on the element (Texture position)
int32_t m_GLtexID; //!< openGL id on the element (texture ID)
ewol::Program* m_GLprogram; //!< pointer on the opengl display program
int32_t m_GLPosition; //!< openGL id on the element (vertex buffer)
int32_t m_GLMatrix; //!< openGL id on the element (transformation matrix)
int32_t m_GLColor; //!< openGL id on the element (color buffer)
int32_t m_GLtexture; //!< openGL id on the element (Texture position)
int32_t m_GLtexID; //!< openGL id on the element (texture ID)
private:
int32_t m_selectionStartPos; //!< start position of the Selection (if == m_cursorPos ==> no selection)
int32_t m_cursorPos; //!< Cursor position (default no cursor ==> -100)
int32_t m_cursorPos; //!< Cursor position (default no cursor ==> -100)
private:
ewol::TexturedFont* m_font; //!< Font resources
ewol::TexturedFont* m_font; //!< Font resources
private: // Text
etk::Vector<vec2 > m_coord; //!< internal coord of the object
etk::Vector<vec2 > m_coordTex; //!< internal texture coordinate for every point
etk::Vector<draw::Colorf> m_coordColor; //!< internal color of the different point
etk::Vector<vec2 > m_coord; //!< internal coord of the object
etk::Vector<vec2 > m_coordTex; //!< internal texture coordinate for every point
etk::Vector<etk::Color<float> > m_coordColor; //!< internal color of the different point
private:
/**
* @brief Load the openGL program and get all the ID needed
@ -150,12 +150,12 @@ namespace ewol
* @brief Set the Color of the current foreground font
* @param[in] _color Color to set on foreground (for next print)
*/
void SetColor(const draw::Color& _color) { m_color = _color; };
void SetColor(const etk::Color<>& _color) { m_color = _color; };
/**
* @brief Set the background color of the font (for selected Text (not the global BG))
* @param[in] _color Color to set on background (for next print)
*/
void SetColorBg(const draw::Color& _color);
void SetColorBg(const etk::Color<>& _color);
/**
* @brief Request a clipping area for the text (next draw only)
* @param[in] _pos Start position of the clipping
@ -402,12 +402,12 @@ namespace ewol
* @brief Change the selection color
* @param[in] _color New color for the Selection
*/
void SetSelectionColor(const draw::Color& _color);
void SetSelectionColor(const etk::Color<>& _color);
/**
* @brief Change the cursor color
* @param[in] _color New color for the Selection
*/
void SetCursorColor(const draw::Color& _color);
void SetCursorColor(const etk::Color<>& _color);
};
};

View File

@ -297,38 +297,14 @@ void guiInterface::SetTitle(etk::UString& title)
X11_INFO("X11: Set Title (END)");
}
#include <ewol/renderer/resources/image/ImageBMP.h>
#include <ewol/renderer/resources/image/ImagePNG.h>
#include <esvg/esvg.h>
#include <egami/egami.h>
void guiInterface::SetIcon(etk::UString inputFile)
void guiInterface::SetIcon(etk::UString _inputFile)
{
draw::Image dataImage;
egami::Image dataImage;
// load data
if (true == inputFile.EndWith(".bmp") ) {
// generate the texture
if (false == ewol::imageBMP::GenerateImage(inputFile, dataImage)) {
EWOL_ERROR("Error To load BMP file " << inputFile );
return;
}
} else if (true == inputFile.EndWith(".svg") ) {
esvg::Document m_element(inputFile);
if (false == m_element.IsLoadOk()) {
EWOL_ERROR("Error To load SVG file " << inputFile );
return;
} else {
// generate the texture
ivec2 tmpSize(32,32);
m_element.GenerateAnImage(tmpSize, dataImage);
}
} else if (true == inputFile.EndWith(".png") ) {
// generate the texture
if (false == ewol::imagePNG::GenerateImage(inputFile, dataImage)) {
EWOL_ERROR("Error To load PNG file " << inputFile );
return;
}
} else {
EWOL_ERROR("Extention not managed " << inputFile << " Sopported extention : .bmp / .svg / .png");
if (false == egami::Load(dataImage, _inputFile)) {
EWOL_ERROR("Error when loading Icon");
return;
}
int32_t depth = DefaultDepth(m_display, DefaultScreen(m_display) );
@ -357,10 +333,10 @@ void guiInterface::SetIcon(etk::UString inputFile)
case 16:
for(ivec2 pos(0,0); pos.y()<dataImage.GetHeight(); pos.setY(pos.y()+1)) {
for(pos.setX(0); pos.x()<dataImage.GetHeight(); pos.setX(pos.x()+1)) {
draw::Color tmpColor = dataImage.Get(pos);
int16_t tmpVal = (((uint16_t)((uint16_t)tmpColor.r>>3))<<11)
+ (((uint16_t)((uint16_t)tmpColor.g>>2))<<5)
+ ((uint16_t)((uint16_t)tmpColor.b>>3));
etk::Color<> tmpColor = dataImage.Get(pos);
int16_t tmpVal = (((uint16_t)((uint16_t)tmpColor.r()>>3))<<11)
+ (((uint16_t)((uint16_t)tmpColor.g()>>2))<<5)
+ ((uint16_t)((uint16_t)tmpColor.b()>>3));
*tmpPointer++ = (uint8_t)(tmpVal>>8);
*tmpPointer++ = (uint8_t)(tmpVal&0x00FF);
}
@ -369,10 +345,10 @@ void guiInterface::SetIcon(etk::UString inputFile)
case 24:
for(ivec2 pos(0,0); pos.y()<dataImage.GetHeight(); pos.setY(pos.y()+1)) {
for(pos.setX(0); pos.x()<dataImage.GetHeight(); pos.setX(pos.x()+1)) {
draw::Color tmpColor = dataImage.Get(pos);
*tmpPointer++ = tmpColor.b;
*tmpPointer++ = tmpColor.g;
*tmpPointer++ = tmpColor.r;
etk::Color<> tmpColor = dataImage.Get(pos);
*tmpPointer++ = tmpColor.b();
*tmpPointer++ = tmpColor.g();
*tmpPointer++ = tmpColor.r();
tmpPointer++;
}
}
@ -380,11 +356,11 @@ void guiInterface::SetIcon(etk::UString inputFile)
case 32:
for(ivec2 pos(0,0); pos.y()<dataImage.GetHeight(); pos.setY(pos.y()+1)) {
for(pos.setX(0); pos.x()<dataImage.GetHeight(); pos.setX(pos.x()+1)) {
draw::Color tmpColor = dataImage.Get(pos);
*tmpPointer++ = tmpColor.a;
*tmpPointer++ = tmpColor.b;
*tmpPointer++ = tmpColor.g;
*tmpPointer++ = tmpColor.r;
etk::Color<> tmpColor = dataImage.Get(pos);
*tmpPointer++ = tmpColor.a();
*tmpPointer++ = tmpColor.b();
*tmpPointer++ = tmpColor.g();
*tmpPointer++ = tmpColor.r();
}
}
break;

View File

@ -14,8 +14,8 @@
#define __class__ "Colored3DObject"
ewol::Colored3DObject::Colored3DObject(etk::UString genName) :
ewol::Resource(genName),
ewol::Colored3DObject::Colored3DObject(etk::UString _genName) :
ewol::Resource(_genName),
m_GLprogram(NULL)
{
etk::UString tmpString("DATA:simple3D.prog");
@ -35,21 +35,21 @@ ewol::Colored3DObject::~Colored3DObject(void)
}
void ewol::Colored3DObject::Draw(etk::Vector<vec3>& vertices,
const draw::Colorf& color,
bool updateDepthBuffer,
bool depthtest)
void ewol::Colored3DObject::Draw(etk::Vector<vec3>& _vertices,
const etk::Color<float>& _color,
bool _updateDepthBuffer,
bool _depthtest)
{
if (vertices.Size()<=0) {
if (_vertices.Size()<=0) {
return;
}
if (m_GLprogram==NULL) {
EWOL_ERROR("No shader ...");
return;
}
if (true==depthtest) {
if (true==_depthtest) {
ewol::openGL::Enable(ewol::openGL::FLAG_DEPTH_TEST);
if (false==updateDepthBuffer) {
if (false==_updateDepthBuffer) {
glDepthMask(GL_FALSE);
}
}
@ -61,39 +61,39 @@ void ewol::Colored3DObject::Draw(etk::Vector<vec3>& vertices,
mat4 tmpMatrix = projMatrix * camMatrix;
m_GLprogram->UniformMatrix4fv(m_GLMatrix, 1, tmpMatrix.m_mat);
// position :
m_GLprogram->SendAttribute(m_GLPosition, 3/*x,y,z,unused*/, &vertices[0], 4*sizeof(float));
m_GLprogram->SendAttribute(m_GLPosition, 3/*x,y,z,unused*/, &_vertices[0], 4*sizeof(float));
// color :
m_GLprogram->Uniform4fv(m_GLColor, 1/*r,g,b,a*/, (float*)&color);
m_GLprogram->Uniform4fv(m_GLColor, 1/*r,g,b,a*/, (float*)&_color);
// Request the draw od the elements :
ewol::openGL::DrawArrays(GL_TRIANGLES, 0, vertices.Size());
ewol::openGL::DrawArrays(GL_TRIANGLES, 0, _vertices.Size());
m_GLprogram->UnUse();
// Request the draw od the elements :
//glDrawArrays(GL_LINES, 0, vertices.Size());
//m_GLprogram->UnUse();
if (true==depthtest) {
if (false==updateDepthBuffer) {
if (true==_depthtest) {
if (false==_updateDepthBuffer) {
glDepthMask(GL_TRUE);
}
ewol::openGL::Disable(ewol::openGL::FLAG_DEPTH_TEST);
}
}
void ewol::Colored3DObject::Draw(etk::Vector<vec3>& vertices,
const draw::Colorf& color,
mat4& transformationMatrix,
bool updateDepthBuffer,
bool depthtest)
void ewol::Colored3DObject::Draw(etk::Vector<vec3>& _vertices,
const etk::Color<float>& _color,
mat4& _transformationMatrix,
bool _updateDepthBuffer,
bool _depthtest)
{
if (vertices.Size()<=0) {
if (_vertices.Size()<=0) {
return;
}
if (m_GLprogram==NULL) {
EWOL_ERROR("No shader ...");
return;
}
if (true==depthtest) {
if (true==_depthtest) {
ewol::openGL::Enable(ewol::openGL::FLAG_DEPTH_TEST);
if (false==updateDepthBuffer) {
if (false==_updateDepthBuffer) {
glDepthMask(GL_FALSE);
}
}
@ -102,39 +102,39 @@ void ewol::Colored3DObject::Draw(etk::Vector<vec3>& vertices,
// set Matrix : translation/positionMatrix
mat4 projMatrix = ewol::openGL::GetMatrix();
mat4 camMatrix = ewol::openGL::GetCameraMatrix();
mat4 tmpMatrix = projMatrix * camMatrix * transformationMatrix;
mat4 tmpMatrix = projMatrix * camMatrix * _transformationMatrix;
m_GLprogram->UniformMatrix4fv(m_GLMatrix, 1, tmpMatrix.m_mat);
// position :
m_GLprogram->SendAttribute(m_GLPosition, 3/*x,y,z*/, &vertices[0], 4*sizeof(float));
m_GLprogram->SendAttribute(m_GLPosition, 3/*x,y,z*/, &_vertices[0], 4*sizeof(float));
// color :
m_GLprogram->Uniform4fv(m_GLColor, 1/*r,g,b,a*/, (float*)&color);
m_GLprogram->Uniform4fv(m_GLColor, 1/*r,g,b,a*/, (float*)&_color);
// Request the draw od the elements :
ewol::openGL::DrawArrays(GL_TRIANGLES, 0, vertices.Size());
ewol::openGL::DrawArrays(GL_TRIANGLES, 0, _vertices.Size());
m_GLprogram->UnUse();
if (true==depthtest) {
if (false==updateDepthBuffer) {
if (true==_depthtest) {
if (false==_updateDepthBuffer) {
glDepthMask(GL_TRUE);
}
ewol::openGL::Disable(ewol::openGL::FLAG_DEPTH_TEST);
}
}
void ewol::Colored3DObject::DrawLine(etk::Vector<vec3>& vertices,
const draw::Colorf& color,
mat4& transformationMatrix,
bool updateDepthBuffer,
bool depthtest)
void ewol::Colored3DObject::DrawLine(etk::Vector<vec3>& _vertices,
const etk::Color<float>& _color,
mat4& _transformationMatrix,
bool _updateDepthBuffer,
bool _depthtest)
{
if (vertices.Size()<=0) {
if (_vertices.Size()<=0) {
return;
}
if (m_GLprogram==NULL) {
EWOL_ERROR("No shader ...");
return;
}
if (true==depthtest) {
if (true==_depthtest) {
ewol::openGL::Enable(ewol::openGL::FLAG_DEPTH_TEST);
if (false==updateDepthBuffer) {
if (false==_updateDepthBuffer) {
glDepthMask(GL_FALSE);
}
}
@ -143,17 +143,17 @@ void ewol::Colored3DObject::DrawLine(etk::Vector<vec3>& vertices,
// set Matrix : translation/positionMatrix
mat4 projMatrix = ewol::openGL::GetMatrix();
mat4 camMatrix = ewol::openGL::GetCameraMatrix();
mat4 tmpMatrix = projMatrix * camMatrix * transformationMatrix;
mat4 tmpMatrix = projMatrix * camMatrix * _transformationMatrix;
m_GLprogram->UniformMatrix4fv(m_GLMatrix, 1, tmpMatrix.m_mat);
// position :
m_GLprogram->SendAttribute(m_GLPosition, 3/*x,y,z*/, &vertices[0], 4*sizeof(float));
m_GLprogram->SendAttribute(m_GLPosition, 3/*x,y,z*/, &_vertices[0], 4*sizeof(float));
// color :
m_GLprogram->Uniform4fv(m_GLColor, 1/*r,g,b,a*/, (float*)&color);
m_GLprogram->Uniform4fv(m_GLColor, 1/*r,g,b,a*/, (float*)&_color);
// Request the draw od the elements :
ewol::openGL::DrawArrays(GL_LINES, 0, vertices.Size());
ewol::openGL::DrawArrays(GL_LINES, 0, _vertices.Size());
m_GLprogram->UnUse();
if (true==depthtest) {
if (false==updateDepthBuffer) {
if (true==_depthtest) {
if (false==_updateDepthBuffer) {
glDepthMask(GL_TRUE);
}
ewol::openGL::Disable(ewol::openGL::FLAG_DEPTH_TEST);

View File

@ -25,23 +25,23 @@ namespace ewol
int32_t m_GLMatrix;
int32_t m_GLColor;
public:
Colored3DObject(etk::UString genName);
Colored3DObject(etk::UString _genName);
virtual ~Colored3DObject(void);
virtual const char* GetType(void) { return "ewol::Colored3DObject"; };
virtual void Draw(etk::Vector<vec3>& vertices,
const draw::Colorf& color,
bool updateDepthBuffer=true,
bool depthtest=true);
virtual void Draw(etk::Vector<vec3>& vertices,
const draw::Colorf& color,
mat4& transformationMatrix,
bool updateDepthBuffer=true,
bool depthtest=true);
virtual void DrawLine(etk::Vector<vec3>& vertices,
const draw::Colorf& color,
mat4& transformationMatrix,
bool updateDepthBuffer=true,
bool depthtest=true);
virtual void Draw(etk::Vector<vec3>& _vertices,
const etk::Color<float>& _color,
bool _updateDepthBuffer=true,
bool _depthtest=true);
virtual void Draw(etk::Vector<vec3>& _vertices,
const etk::Color<float>& _color,
mat4& _transformationMatrix,
bool _updateDepthBuffer=true,
bool _depthtest=true);
virtual void DrawLine(etk::Vector<vec3>& _vertices,
const etk::Color<float>& _color,
mat4& _transformationMatrix,
bool _updateDepthBuffer=true,
bool _depthtest=true);
};
};

View File

@ -46,14 +46,14 @@ void ewol::FreeTypeUnInit(void)
ewol::FontFreeType::FontFreeType(etk::UString fontName) :
FontBase(fontName)
ewol::FontFreeType::FontFreeType(const etk::UString& _fontName) :
FontBase(_fontName)
{
m_init = false;
m_FileBuffer = NULL;
m_FileSize = 0;
etk::FSNode myfile(fontName);
etk::FSNode myfile(_fontName);
if (false == myfile.Exist()) {
EWOL_ERROR("File Does not exist : " << myfile);
return;
@ -70,7 +70,7 @@ ewol::FontFreeType::FontFreeType(etk::UString fontName) :
// allocate data
m_FileBuffer = new FT_Byte[m_FileSize];
if (NULL == m_FileBuffer) {
EWOL_ERROR("Error Memory allocation size=" << fontName);
EWOL_ERROR("Error Memory allocation size=" << _fontName);
return;
}
// load data from the file :
@ -85,7 +85,7 @@ ewol::FontFreeType::FontFreeType(etk::UString fontName) :
EWOL_ERROR("... another error code means that the font file could not ... be opened or read, or simply that it is broken...");
} else {
// all OK
EWOL_INFO("load font : \"" << fontName << "\" ");
EWOL_INFO("load font : \"" << _fontName << "\" ");
//Display();
m_init = true;
}
@ -103,7 +103,7 @@ ewol::FontFreeType::~FontFreeType(void)
}
vec2 ewol::FontFreeType::GetSize(int32_t fontSize, const etk::UString & unicodeString)
vec2 ewol::FontFreeType::GetSize(int32_t _fontSize, const etk::UString& _unicodeString)
{
if(false==m_init) {
return vec2(0,0);
@ -113,13 +113,12 @@ vec2 ewol::FontFreeType::GetSize(int32_t fontSize, const etk::UString & unicodeS
return outputSize;
}
int32_t ewol::FontFreeType::GetHeight(int32_t fontSize)
int32_t ewol::FontFreeType::GetHeight(int32_t _fontSize)
{
return fontSize*1.43f; // this is a really "magic" number ...
return _fontSize*1.43f; // this is a really "magic" number ...
}
bool ewol::FontFreeType::GetGlyphProperty(int32_t fontSize,
ewol::GlyphProperty& property)
bool ewol::FontFreeType::GetGlyphProperty(int32_t _fontSize, ewol::GlyphProperty& _property)
{
if(false==m_init) {
return false;
@ -128,7 +127,7 @@ bool ewol::FontFreeType::GetGlyphProperty(int32_t fontSize,
int32_t fontQuality = 96;
// Select Size ...
// note tha <<6==*64 corespond with the 1/64th of points calculation of freetype
int32_t error = FT_Set_Char_Size(m_fftFace, fontSize<<6, fontSize<<6, fontQuality, fontQuality);
int32_t error = FT_Set_Char_Size(m_fftFace, _fontSize<<6, _fontSize<<6, fontQuality, fontQuality);
if (0!=error ) {
EWOL_ERROR("FT_Set_Char_Size ==> error in settings ...");
return false;
@ -136,7 +135,7 @@ bool ewol::FontFreeType::GetGlyphProperty(int32_t fontSize,
// a small shortcut
FT_GlyphSlot slot = m_fftFace->glyph;
// retrieve glyph index from character code
int32_t glyph_index = FT_Get_Char_Index(m_fftFace, property.m_UVal.Get());
int32_t glyph_index = FT_Get_Char_Index(m_fftFace, _property.m_UVal.Get());
// load glyph image into the slot (erase previous one)
error = FT_Load_Glyph(m_fftFace, // handle to face object
glyph_index, // glyph index
@ -152,19 +151,19 @@ bool ewol::FontFreeType::GetGlyphProperty(int32_t fontSize,
return false;
}
// set properties :
property.m_glyphIndex = glyph_index;
property.m_sizeTexture.setValue(slot->bitmap.width, slot->bitmap.rows);
property.m_bearing.setValue( slot->metrics.horiBearingX>>6 , slot->metrics.horiBearingY>>6 );
property.m_advance.setValue( slot->metrics.horiAdvance>>6 , slot->metrics.vertAdvance>>6 );
_property.m_glyphIndex = glyph_index;
_property.m_sizeTexture.setValue(slot->bitmap.width, slot->bitmap.rows);
_property.m_bearing.setValue( slot->metrics.horiBearingX>>6 , slot->metrics.horiBearingY>>6 );
_property.m_advance.setValue( slot->metrics.horiAdvance>>6 , slot->metrics.vertAdvance>>6 );
return true;
}
bool ewol::FontFreeType::DrawGlyph(draw::Image& imageOut,
int32_t fontSize,
ivec2 glyphPosition,
ewol::GlyphProperty& property,
int8_t posInImage)
bool ewol::FontFreeType::DrawGlyph(egami::Image& _imageOut,
int32_t _fontSize,
ivec2 _glyphPosition,
ewol::GlyphProperty& _property,
int8_t _posInImage)
{
if(false==m_init) {
@ -174,7 +173,7 @@ bool ewol::FontFreeType::DrawGlyph(draw::Image& imageOut,
int32_t fontQuality = 96;
// Select Size ...
// note tha <<6==*64 corespond with the 1/64th of points calculation of freetype
int32_t error = FT_Set_Char_Size(m_fftFace, fontSize<<6, fontSize<<6, fontQuality, fontQuality);
int32_t error = FT_Set_Char_Size(m_fftFace, _fontSize<<6, _fontSize<<6, fontQuality, fontQuality);
if (0!=error ) {
EWOL_ERROR("FT_Set_Char_Size ==> error in settings ...");
return false;
@ -183,7 +182,7 @@ bool ewol::FontFreeType::DrawGlyph(draw::Image& imageOut,
FT_GlyphSlot slot = m_fftFace->glyph;
// load glyph image into the slot (erase previous one)
error = FT_Load_Glyph(m_fftFace, // handle to face object
property.m_glyphIndex, // glyph index
_property.m_glyphIndex, // glyph index
FT_LOAD_DEFAULT );
if (0!=error ) {
EWOL_ERROR("FT_Load_Glyph specify Glyph");
@ -196,30 +195,30 @@ bool ewol::FontFreeType::DrawGlyph(draw::Image& imageOut,
return false;
}
// draw it on the output Image :
draw::Color tlpppp(0xFF,0xFF,0xFF,0x00);
etk::Color<> tlpppp(0xFFFFFF00);
for(int32_t jjj=0; jjj < slot->bitmap.rows;jjj++) {
for(int32_t iii=0; iii < slot->bitmap.width; iii++){
tlpppp = imageOut.Get(ivec2(glyphPosition.x()+iii, glyphPosition.y()+jjj));
tlpppp = _imageOut.Get(ivec2(_glyphPosition.x()+iii, _glyphPosition.y()+jjj));
uint8_t valueColor = slot->bitmap.buffer[iii + slot->bitmap.width*jjj];
// set only alpha :
switch(posInImage)
switch(_posInImage)
{
default:
case 0:
tlpppp.a = valueColor;
tlpppp.SetA(valueColor);
break;
case 1:
tlpppp.r = valueColor;
tlpppp.SetR(valueColor);
break;
case 2:
tlpppp.g = valueColor;
tlpppp.SetG(valueColor);
break;
case 3:
tlpppp.b = valueColor;
tlpppp.SetB(valueColor);
break;
}
// real set of color
imageOut.Set(ivec2(glyphPosition.x()+iii, glyphPosition.y()+jjj), tlpppp );
_imageOut.Set(ivec2(_glyphPosition.x()+iii, _glyphPosition.y()+jjj), tlpppp );
}
}
return true;

View File

@ -23,29 +23,29 @@ namespace ewol
class FontFreeType : public ewol::FontBase
{
private:
FT_Byte * m_FileBuffer;
int32_t m_FileSize;
FT_Face m_fftFace;
bool m_init;
FT_Byte* m_FileBuffer;
int32_t m_FileSize;
FT_Face m_fftFace;
bool m_init;
void Display(void);
public:
FontFreeType(etk::UString fontName);
FontFreeType(const etk::UString& _fontName);
~FontFreeType(void);
bool GetGlyphProperty(int32_t fontSize,
ewol::GlyphProperty& property);
bool GetGlyphProperty(int32_t _fontSize,
ewol::GlyphProperty& _property);
bool DrawGlyph(draw::Image& imageOut,
int32_t fontSize,
ivec2 glyphPosition,
ewol::GlyphProperty& property,
int8_t posInImage);
bool DrawGlyph(egami::Image& _imageOut,
int32_t _fontSize,
ivec2 _glyphPosition,
ewol::GlyphProperty& _property,
int8_t _posInImage);
vec2 GetSize(int32_t fontSize, const etk::UString & unicodeString);
vec2 GetSize(int32_t _fontSize, const etk::UString& _unicodeString);
int32_t GetHeight(int32_t fontSize);
int32_t GetHeight(int32_t _fontSize);
void GenerateKerning(int32_t fontSize, etk::Vector<ewol::GlyphProperty>& listGlyph);
void GenerateKerning(int32_t _fontSize, etk::Vector<ewol::GlyphProperty>& _listGlyph);
};
void FreeTypeInit(void);
void FreeTypeUnInit(void);

View File

@ -8,53 +8,20 @@
#include <etk/types.h>
#include <etk/os/FSNode.h>
#include <esvg/esvg.h>
#include <egami/egami.h>
#include <ewol/renderer/ResourceManager.h>
#include <ewol/renderer/resources/Image.h>
#include <ewol/renderer/resources/Texture.h>
#include <ewol/renderer/resources/image/ImageBMP.h>
#include <ewol/renderer/resources/image/ImagePNG.h>
#undef __class__
#define __class__ "TextureFile"
ewol::TextureFile::TextureFile(etk::UString genName, etk::UString tmpfileName, ivec2 size) :
Texture(genName)
ewol::TextureFile::TextureFile(etk::UString _genName, const etk::UString& _tmpfileName, const ivec2& _size) :
Texture(_genName)
{
etk::UString tmpName = tmpfileName;
// load data
if (true == tmpName.EndWith(".bmp") ) {
// generate the texture
if (false == ewol::imageBMP::GenerateImage(tmpName, m_data)) {
EWOL_ERROR("Error To load BMP file " << tmpName );
}
} else if (true == tmpName.EndWith(".svg") ) {
esvg::Document m_element(tmpName);
if (false == m_element.IsLoadOk()) {
EWOL_ERROR("Error To load SVG file " << tmpName );
} else {
/*
if (size.x()>0 && size.y()>0) {
// generate the texture
m_element.GenerateAnImage(size, m_data);
} else {
*/
// generate the texture
m_element.GenerateAnImage(m_data);
//}
}
} else if (true == tmpName.EndWith(".png") ) {
// generate the texture
if (false == ewol::imagePNG::GenerateImage(tmpName, m_data)) {
EWOL_ERROR("Error To load PNG file " << tmpName );
}
} else {
EWOL_ERROR("Extention not managed " << tmpName << " Sopported extention : .bmp / .svg / .png");
if (true == egami::Load(m_data, _tmpfileName, _size)) {
EWOL_ERROR("ERROR when loading the image : " << _tmpfileName);
}
ivec2 tmp = m_data.GetSize();
m_realImageSize = vec2(tmp.x(), tmp.y());

View File

@ -11,7 +11,7 @@
#include <etk/types.h>
#include <etk/UString.h>
#include <draw/Image.h>
#include <egami/Image.h>
#include <ewol/renderer/resources/Texture.h>
#include <ewol/renderer/resources/Resource.h>
@ -22,7 +22,7 @@ namespace ewol
private:
vec2 m_realImageSize;
public:
TextureFile(etk::UString genName, etk::UString fileName, ivec2 size);
TextureFile(etk::UString _genName, const etk::UString& _fileName, const ivec2& _size);
~TextureFile(void) { };
virtual const char* GetType(void) { return "ewol::TextureFile"; };
const vec2& GetRealSize(void) { return m_realImageSize; };

View File

@ -7,13 +7,9 @@
*/
#include <etk/types.h>
#include <ewol/ewol.h>
#include <ewol/renderer/openGL.h>
#include <ewol/renderer/ResourceManager.h>
#include <ewol/renderer/resources/Texture.h>
#undef __class__
@ -24,11 +20,11 @@
* @param[in] value Value that we want the next power of 2
* @return result value
*/
static int32_t nextP2(int32_t value)
static int32_t nextP2(int32_t _value)
{
int32_t val=1;
for (int32_t iii=1; iii<31; iii++) {
if (value <= val) {
if (_value <= val) {
return val;
}
val *=2;
@ -39,8 +35,8 @@ static int32_t nextP2(int32_t value)
ewol::Texture::Texture(etk::UString tmpName) :
Resource(tmpName)
ewol::Texture::Texture(etk::UString _tmpName) :
Resource(_tmpName)
{
m_loaded = false;
m_texId = 0;
@ -111,9 +107,9 @@ void ewol::Texture::Flush(void)
}
void ewol::Texture::SetImageSize(ivec2 newSize)
void ewol::Texture::SetImageSize(ivec2 _newSize)
{
newSize.setValue( nextP2(newSize.x()), nextP2(newSize.y()) );
m_data.Resize(newSize);
_newSize.setValue( nextP2(_newSize.x()), nextP2(_newSize.y()) );
m_data.Resize(_newSize);
}

View File

@ -11,7 +11,7 @@
#include <etk/types.h>
#include <ewol/debug.h>
#include <draw/Image.h>
#include <egami/Image.h>
#include <ewol/renderer/openGL.h>
#include <ewol/renderer/resources/Resource.h>
@ -19,13 +19,13 @@ namespace ewol {
class Texture : public ewol::Resource {
protected:
// openGl Context propoerties :
draw::Image m_data;
egami::Image m_data;
// OpenGl textureID :
GLuint m_texId;
GLuint m_texId;
// some image are not square ==> we need to sqared it to prevent some openGl api error the the displayable size is not all the time 0.0 -> 1.0
vec2 m_endPointSize;
// internal state of the openGl system :
bool m_loaded;
bool m_loaded;
// Ewol internal API:
public:
void UpdateContext(void);
@ -43,7 +43,7 @@ namespace ewol {
// you must set the size here, because it will be set in multiple of pow(2)
void SetImageSize(ivec2 newSize);
// get the reference on this image to draw nomething on it ...
inline draw::Image& Get(void) { return m_data; };
inline egami::Image& Get(void) { return m_data; };
// Flush the data to send it at the OpenGl system
void Flush(void);
};

View File

@ -264,8 +264,7 @@ ewol::TexturedFont::TexturedFont(etk::UString fontName) :
// resize must be done on the texture ...
SetImageSize(ivec2(textureWidth,textureHeight));
// now we can acces directly on the image
m_data.SetFillColor(draw::Color(0x00000000));
m_data.Clear();
m_data.Clear(etk::Color<>(0x00000000));
}
m_height[iiiFontId] = m_font[iiiFontId]->GetHeight(m_size);

View File

@ -11,7 +11,7 @@
#include <etk/types.h>
#include <ewol/debug.h>
#include <draw/Image.h>
#include <egami/Image.h>
#include <ewol/renderer/resources/Texture.h>
#include <ewol/renderer/resources/Resource.h>
#include <ewol/renderer/resources/font/GlyphProperty.h>
@ -23,26 +23,26 @@ namespace ewol
{
protected:
public:
FontBase(etk::UString fontName) : ewol::Resource(fontName) {};
FontBase(const etk::UString& _fontName) : ewol::Resource(_fontName) {};
virtual ~FontBase(void) { };
const char* GetType(void) { return "ewol::Font"; };
virtual bool GetGlyphProperty(int32_t fontSize,
ewol::GlyphProperty& property) = 0;
virtual bool GetGlyphProperty(int32_t _fontSize,
ewol::GlyphProperty& _property) = 0;
virtual bool DrawGlyph(draw::Image& imageOut,
int32_t fontSize,
ivec2 glyphPosition,
ewol::GlyphProperty& property,
int8_t posInImage) = 0;
virtual bool DrawGlyph(egami::Image& _imageOut,
int32_t _fontSize,
ivec2 _glyphPosition,
ewol::GlyphProperty& _property,
int8_t _posInImage) = 0;
virtual vec2 GetSize(int32_t fontSize, const etk::UString & unicodeString) = 0;
virtual vec2 GetSize(int32_t _fontSize, const etk::UString& _unicodeString) = 0;
virtual int32_t GetHeight(int32_t fontSize) = 0;
virtual int32_t GetHeight(int32_t _fontSize) = 0;
virtual void GenerateKerning(int32_t fontSize, etk::Vector<ewol::GlyphProperty>& listGlyph) { };
virtual void GenerateKerning(int32_t _fontSize, etk::Vector<ewol::GlyphProperty>& _listGlyph) { };
virtual void Display(void) {};
};

View File

@ -73,7 +73,7 @@ namespace ewol
{ };
float KerningGet(const uniChar_t charcode)
{
for(int32_t iii=0; iii<m_kerning.Size(); iii++ ) {
for(esize_t iii=0; iii<m_kerning.Size(); iii++ ) {
if (m_kerning[iii].m_UVal == charcode) {
return m_kerning[iii].m_value;
}

View File

@ -46,7 +46,7 @@ void widget::ButtonColor::UnInit(void)
}
widget::ButtonColor::ButtonColor(draw::Color baseColor, etk::UString shaperName) :
widget::ButtonColor::ButtonColor(etk::Color<> baseColor, etk::UString shaperName) :
m_shaper(shaperName),
m_textColorFg(baseColor),
m_widgetContextMenu(NULL)
@ -74,7 +74,7 @@ void widget::ButtonColor::SetShaperName(etk::UString shaperName)
void widget::ButtonColor::CalculateMinMaxSize(void)
{
vec2 padding = m_shaper.GetPadding();
etk::UString label = draw::GetString(m_textColorFg);
etk::UString label = m_textColorFg.GetString();
vec3 minSize = m_text.CalculateSize(label);
m_minSize.setX(padding.x()*2 + minSize.x() + 7);
m_minSize.setY(padding.y()*2 + minSize.y() );
@ -98,7 +98,7 @@ void widget::ButtonColor::OnRegenerateDisplay(void)
vec2 padding = m_shaper.GetPadding();
etk::UString label = draw::GetString(m_textColorFg);
etk::UString label = m_textColorFg.GetString();
ivec2 localSize = m_minSize;
@ -124,12 +124,12 @@ void widget::ButtonColor::OnRegenerateDisplay(void)
// clean the element
m_text.Reset();
if( m_textColorFg.r < 100
|| m_textColorFg.g < 100
|| m_textColorFg.b < 100) {
m_text.SetColor(draw::color::white);
if( m_textColorFg.r() < 100
|| m_textColorFg.g() < 100
|| m_textColorFg.b() < 100) {
m_text.SetColor(etk::color::white);
} else {
m_text.SetColor(draw::color::black);
m_text.SetColor(etk::color::black);
}
m_text.SetPos(tmpTextOrigin);
m_text.SetColorBg(m_textColorFg);
@ -224,13 +224,13 @@ bool widget::ButtonColor::OnEventInput(const ewol::EventInput& _event)
}
void widget::ButtonColor::SetValue(draw::Color color)
void widget::ButtonColor::SetValue(etk::Color<> _color)
{
m_textColorFg = color;
m_textColorFg = _color;
MarkToRedraw();
}
draw::Color widget::ButtonColor::GetValue(void)
etk::Color<> widget::ButtonColor::GetValue(void)
{
return m_textColorFg;
}
@ -240,16 +240,16 @@ void widget::ButtonColor::OnReceiveMessage(const ewol::EMessage& _msg)
{
EWOL_INFO("Receive MSG : " << _msg.GetData());
if (_msg.GetMessage() == ewolEventColorChooserChange) {
draw::ParseColor(_msg.GetData().c_str(), m_textColorFg);
m_textColorFg = _msg.GetData();
GenerateEventId(ewolEventButtonColorChange, _msg.GetData());
MarkToRedraw();
}
}
void widget::ButtonColor::ChangeStatusIn(int32_t newStatusId)
void widget::ButtonColor::ChangeStatusIn(int32_t _newStatusId)
{
if (true == m_shaper.ChangeStatusIn(newStatusId) ) {
if (true == m_shaper.ChangeStatusIn(_newStatusId) ) {
PeriodicCallEnable();
MarkToRedraw();
}

View File

@ -28,7 +28,7 @@ namespace widget {
private:
ewol::Shaper m_shaper; //!< Compositing theme.
ewol::Text m_text; //!< Compositing Test display.
draw::Color m_textColorFg; //!< Current color.
etk::Color<> m_textColorFg; //!< Current color.
widget::ContextMenu* m_widgetContextMenu; //!< Specific context menu.
bool m_mouseHover; //!< Flag to know where the mouse is (inside the displayed widget (if not fill)).
bool m_buttonPressed; //!< Flag to know if the button is curently pressed.
@ -38,29 +38,29 @@ namespace widget {
public:
/**
* @brief Main constructor.
* @param[in] baseColor basic displayed color.
* @param[in] shaperName The new shaper filename.
* @param[in] _baseColor basic displayed color.
* @param[in] _shaperName The new shaper filename.
*/
ButtonColor(draw::Color baseColor=draw::color::black, etk::UString shaperName="THEME:GUI:widgetButton.conf");
ButtonColor(etk::Color<> _baseColor=etk::color::black, etk::UString _shaperName="THEME:GUI:widgetButton.conf");
/**
* @brief Main destructor.
*/
virtual ~ButtonColor(void);
/**
* @brief Set the shaper name (use the contructer one this permit to not noad unused shaper).
* @param[in] shaperName The new shaper filename.
* @param[in] _shaperName The new shaper filename.
*/
void SetShaperName(etk::UString shaperName);
void SetShaperName(etk::UString _shaperName);
/**
* @brief Get the current color of the color selection widget
* @return The current color
*/
draw::Color GetValue(void);
etk::Color<> GetValue(void);
/**
* @brief Specify the current color.
* @param[in] color The new display color.
* @param[in] _color The new display color.
*/
void SetValue(draw::Color color);
void SetValue(etk::Color<> _color);
protected: // Derived function
virtual void OnDraw(void);
public: // Derived function
@ -72,9 +72,9 @@ namespace widget {
private:
/**
* @brief Internal system to Change the property of the current status
* @param[in] new state
* @param[in] _newStatusId new state
*/
void ChangeStatusIn(int32_t newStatusId);
void ChangeStatusIn(int32_t _newStatusId);
// Derived function
virtual void PeriodicCall(const ewol::EventTime& _event);
};

View File

@ -35,8 +35,8 @@ widget::CheckBox::CheckBox(const etk::UString& newLabel)
{
m_label = newLabel;
AddEventId(ewolEventCheckBoxClicked);
m_textColorFg = draw::color::black;
m_textColorBg = draw::color::white;
m_textColorFg = etk::color::black;
m_textColorBg = etk::color::white;
m_value = false;
SetCanHaveFocus(true);
SetMouseLimit(1);

View File

@ -34,8 +34,8 @@ namespace widget {
ewol::Drawing m_oObjectDecoration;
etk::UString m_label;
bool m_value;
draw::Color m_textColorFg; //!< Text color
draw::Color m_textColorBg; //!< Background color
etk::Color<> m_textColorFg; //!< Text color
etk::Color<> m_textColorBg; //!< Background color
protected: // Derived function
virtual void OnDraw(void);
public: // Derived function

View File

@ -11,7 +11,7 @@
#include <ewol/compositing/Drawing.h>
#include <ewol/widget/WidgetManager.h>
#include <draw/Color.h>
#include <etk/Color.h>
extern const char * const ewolEventColorBarChange = "ewol-color-bar-change";
@ -24,7 +24,7 @@ widget::ColorBar::ColorBar(void)
{
AddEventId(ewolEventColorBarChange);
m_currentUserPos.setValue(0,0);
m_currentColor = draw::color::black;
m_currentColor = etk::color::black;
SetCanHaveFocus(true);
SetMouseLimit(1);
}
@ -40,10 +40,10 @@ void widget::ColorBar::CalculateMinMaxSize(void)
m_minSize.setValue(160, 80);
MarkToRedraw();
}
static draw::Color s_listColorWhite(0xFFFFFFFF);
static draw::Color s_listColorBlack(0x000000FF);
static etk::Color<> s_listColorWhite(0xFFFFFFFF);
static etk::Color<> s_listColorBlack(0x000000FF);
#define NB_BAND_COLOR (6)
static draw::Color s_listColor[NB_BAND_COLOR+1] = {
static etk::Color<> s_listColor[NB_BAND_COLOR+1] = {
0xFF0000FF,
0xFFFF00FF,
0x00FF00FF,
@ -53,14 +53,14 @@ static draw::Color s_listColor[NB_BAND_COLOR+1] = {
0xFF0000FF
};
draw::Color widget::ColorBar::GetCurrentColor(void)
etk::Color<> widget::ColorBar::GetCurrentColor(void)
{
return m_currentColor;
}
void widget::ColorBar::SetCurrentColor(draw::Color newOne)
void widget::ColorBar::SetCurrentColor(etk::Color<> newOne)
{
m_currentColor = newOne;
m_currentColor.a = 0xFF;
m_currentColor.SetA(0xFF);
// estimate the cursor position :
// TODO : Later when really needed ...
}
@ -158,9 +158,9 @@ void widget::ColorBar::OnRegenerateDisplay(void)
m_draw.AddVertex();
}
if (m_currentUserPos.y() > 0.5) {
m_draw.SetColor(draw::color::white);
m_draw.SetColor(etk::color::white);
} else {
m_draw.SetColor(draw::color::black);
m_draw.SetColor(etk::color::black);
}
m_draw.SetPos(vec3(m_currentUserPos.x()*m_size.x(), m_currentUserPos.y()*m_size.y(), 0) );
m_draw.SetThickness(1);
@ -189,41 +189,41 @@ bool widget::ColorBar::OnEventInput(const ewol::EventInput& _event)
float localPos = relativePos.x() - (m_size.x()/6) * bandID;
float poroportionnalPos = localPos/(m_size.x()/6);
EWOL_VERBOSE("bandId=" << bandID << " relative pos=" << localPos);
draw::Color estimateColor = draw::color::white;
if (s_listColor[bandID].r == s_listColor[bandID+1].r) {
estimateColor.r = s_listColor[bandID].r;
} else if (s_listColor[bandID].r < s_listColor[bandID+1].r) {
estimateColor.r = s_listColor[bandID].r + (s_listColor[bandID+1].r-s_listColor[bandID].r)*poroportionnalPos;
etk::Color<> estimateColor = etk::color::white;
if (s_listColor[bandID].r() == s_listColor[bandID+1].r()) {
estimateColor.SetR(s_listColor[bandID].r());
} else if (s_listColor[bandID].r() < s_listColor[bandID+1].r()) {
estimateColor.SetR(s_listColor[bandID].r() + (s_listColor[bandID+1].r()-s_listColor[bandID].r())*poroportionnalPos);
} else {
estimateColor.r = s_listColor[bandID+1].r + (s_listColor[bandID].r-s_listColor[bandID+1].r)*(1-poroportionnalPos);
estimateColor.SetR(s_listColor[bandID+1].r() + (s_listColor[bandID].r()-s_listColor[bandID+1].r())*(1-poroportionnalPos));
}
if (s_listColor[bandID].g == s_listColor[bandID+1].g) {
estimateColor.g = s_listColor[bandID].g;
} else if (s_listColor[bandID].g < s_listColor[bandID+1].g) {
estimateColor.g = s_listColor[bandID].g + (s_listColor[bandID+1].g-s_listColor[bandID].g)*poroportionnalPos;
if (s_listColor[bandID].g() == s_listColor[bandID+1].g()) {
estimateColor.SetG(s_listColor[bandID].g());
} else if (s_listColor[bandID].g() < s_listColor[bandID+1].g()) {
estimateColor.SetG(s_listColor[bandID].g() + (s_listColor[bandID+1].g()-s_listColor[bandID].g())*poroportionnalPos);
} else {
estimateColor.g = s_listColor[bandID+1].g + (s_listColor[bandID].g-s_listColor[bandID+1].g)*(1-poroportionnalPos);
estimateColor.SetG(s_listColor[bandID+1].g() + (s_listColor[bandID].g()-s_listColor[bandID+1].g())*(1-poroportionnalPos));
}
if (s_listColor[bandID].b == s_listColor[bandID+1].b) {
estimateColor.b = s_listColor[bandID].b;
} else if (s_listColor[bandID].b < s_listColor[bandID+1].b) {
estimateColor.b = s_listColor[bandID].b + (s_listColor[bandID+1].b-s_listColor[bandID].b)*poroportionnalPos;
if (s_listColor[bandID].b() == s_listColor[bandID+1].b()) {
estimateColor.SetB(s_listColor[bandID].b());
} else if (s_listColor[bandID].b() < s_listColor[bandID+1].b()) {
estimateColor.SetB(s_listColor[bandID].b() + (s_listColor[bandID+1].b()-s_listColor[bandID].b())*poroportionnalPos);
} else {
estimateColor.b = s_listColor[bandID+1].b + (s_listColor[bandID].b-s_listColor[bandID+1].b)*(1-poroportionnalPos);
estimateColor.SetB(s_listColor[bandID+1].b() + (s_listColor[bandID].b()-s_listColor[bandID+1].b())*(1-poroportionnalPos));
}
// step 2 generate the white and black ...
if (m_currentUserPos.y() == 0.5) {
// nothing to do ... just get the current color ...
} else if (m_currentUserPos.y() < 0.5) {
float poroportionnalWhite = (0.5-m_currentUserPos.y())*2.0;
estimateColor.r = estimateColor.r + (0xFF-estimateColor.r)*poroportionnalWhite;
estimateColor.g = estimateColor.g + (0xFF-estimateColor.g)*poroportionnalWhite;
estimateColor.b = estimateColor.b + (0xFF-estimateColor.b)*poroportionnalWhite;
estimateColor.SetR(estimateColor.r() + (0xFF-estimateColor.r())*poroportionnalWhite);
estimateColor.SetG(estimateColor.g() + (0xFF-estimateColor.g())*poroportionnalWhite);
estimateColor.SetB(estimateColor.b() + (0xFF-estimateColor.b())*poroportionnalWhite);
} else {
float poroportionnalBlack = (m_currentUserPos.y()-0.5)*2.0;
estimateColor.r = estimateColor.r - estimateColor.r*poroportionnalBlack;
estimateColor.g = estimateColor.g - estimateColor.g*poroportionnalBlack;
estimateColor.b = estimateColor.b - estimateColor.b*poroportionnalBlack;
estimateColor.SetR(estimateColor.r() - estimateColor.r()*poroportionnalBlack);
estimateColor.SetG(estimateColor.g() - estimateColor.g()*poroportionnalBlack);
estimateColor.SetB(estimateColor.b() - estimateColor.b()*poroportionnalBlack);
}
if(m_currentColor != estimateColor) {
m_currentColor = estimateColor;

View File

@ -11,7 +11,7 @@
#include <etk/types.h>
#include <ewol/debug.h>
#include <draw/Color.h>
#include <etk/Color.h>
#include <ewol/widget/Widget.h>
#include <ewol/compositing/Drawing.h>
@ -23,12 +23,12 @@ namespace widget {
public:
ColorBar(void);
virtual ~ColorBar(void);
draw::Color GetCurrentColor(void);
void SetCurrentColor(draw::Color newOne);
etk::Color<> GetCurrentColor(void);
void SetCurrentColor(etk::Color<> _newOne);
private:
ewol::Drawing m_draw; //!< Compositing drawing element
draw::Color m_currentColor;
vec2 m_currentUserPos;
ewol::Drawing m_draw; //!< Compositing drawing element
etk::Color<> m_currentColor;
vec2 m_currentUserPos;
protected: // Derived function
virtual void OnDraw(void);
public: // Derived function

View File

@ -49,10 +49,10 @@ widget::ContextMenu::ContextMenu(const etk::UString& _shaperName) :
m_offset = 20;
m_colorBackGroung = draw::color::white;
m_colorBackGroung = etk::color::white;
m_colorBorder = draw::color::black;
m_colorBorder.a = 0x7F;
m_colorBorder = etk::color::black;
m_colorBorder.SetA(0x7F);
m_arrowPos.setValue(0,0);
m_arrawBorder = widget::CONTEXT_MENU_MARK_TOP;

View File

@ -10,7 +10,7 @@
#define __EWOL_CONTEXT_MENU_H__
#include <etk/types.h>
#include <draw/Color.h>
#include <etk/Color.h>
#include <ewol/debug.h>
#include <ewol/widget/Container.h>
#include <ewol/compositing/Drawing.h>
@ -47,8 +47,8 @@ namespace widget {
private:
// TODO : Rework the displayer ....
ewol::Drawing m_compositing;
draw::Color m_colorBackGroung;
draw::Color m_colorBorder;
etk::Color<> m_colorBackGroung;
etk::Color<> m_colorBorder;
float m_offset;
private:

View File

@ -63,11 +63,11 @@ widget::Entry::Entry(etk::UString _newData) :
m_displayCursor(false),
m_displayCursorPos(0),
m_displayCursorPosSelection(0),
m_textColorFg(draw::color::black),
m_textColorBg(draw::color::white),
m_textColorFg(etk::color::black),
m_textColorBg(etk::color::white),
m_textWhenNothing("")
{
m_textColorBg.a = 0xAF;
m_textColorBg.SetA(0xAF);
SetCanHaveFocus(true);
AddEventId(eventClick);
AddEventId(eventEnter);
@ -605,13 +605,13 @@ void widget::Entry::SetRegExp(const etk::UString& _expression)
}
void widget::Entry::SetColorText(const draw::Color& _color)
void widget::Entry::SetColorText(const etk::Color<>& _color)
{
m_textColorFg = _color;
MarkToRedraw();
}
void widget::Entry::SetColorTextSelected(const draw::Color& _color)
void widget::Entry::SetColorTextSelected(const etk::Color<>& _color)
{
m_textColorBg = _color;
MarkToRedraw();
@ -637,15 +637,11 @@ bool widget::Entry::OnSetConfig(const ewol::EConfig& _conf)
return true;
}
if (_conf.GetConfig() == configColorFg) {
draw::Color tmpColor;
draw::ParseColor(_conf.GetData().c_str(), tmpColor);
SetColorText(tmpColor);
SetColorText(_conf.GetData());
return true;
}
if (_conf.GetConfig() == configColorBg) {
draw::Color tmpColor;
draw::ParseColor(_conf.GetData().c_str(), tmpColor);
SetColorTextSelected(tmpColor);
SetColorTextSelected(_conf.GetData());
return true;
}
if (_conf.GetConfig() == configEmptyMessage) {
@ -669,11 +665,11 @@ bool widget::Entry::OnGetConfig(const char* _config, etk::UString& _result) cons
return true;
}
if (_config == configColorFg) {
_result = draw::GetString(GetColorText());
_result = GetColorText().GetString();
return true;
}
if (_config == configColorBg) {
_result = draw::GetString(GetColorTextSelected());
_result = GetColorTextSelected().GetString();
return true;
}
if (_config == configEmptyMessage) {

View File

@ -16,7 +16,7 @@
#include <ewol/compositing/Drawing.h>
#include <ewol/compositing/Shaper.h>
#include <ewol/widget/Widget.h>
#include <draw/Color.h>
#include <etk/Color.h>
namespace widget {
/**
@ -142,32 +142,32 @@ namespace widget {
virtual void RemoveSelected(void);
private:
draw::Color m_textColorFg; //!< Text color.
etk::Color<> m_textColorFg; //!< Text color.
public:
/**
* @brief Set text color.
* @param _color Color that is selected.
*/
void SetColorText(const draw::Color& _color);
void SetColorText(const etk::Color<>& _color);
/**
* @brief Get the color for the text.
* @return The color requested.
*/
const draw::Color& GetColorText(void) const { return m_textColorFg; };
const etk::Color<>& GetColorText(void) const { return m_textColorFg; };
private:
draw::Color m_textColorBg; //!< Background color.
etk::Color<> m_textColorBg; //!< Background color.
public:
/**
* @brief Set text backgroung color when selected.
* @param _color Color that is selected.
*/
void SetColorTextSelected(const draw::Color& _color);
void SetColorTextSelected(const etk::Color<>& _color);
/**
* @brief Get the selected color for the text in selection mode.
* @return The color requested.
*/
const draw::Color& GetColorTextSelected(void) const { return m_textColorBg; };
const etk::Color<>& GetColorTextSelected(void) const { return m_textColorBg; };
private:
etk::UString m_textWhenNothing; //!< Text to display when nothing in in the entry (decorated text...)

View File

@ -143,7 +143,7 @@ void widget::List::OnRegenerateDisplay(void)
etk::Vector<int32_t> listSizeColomn;
ewol::Drawing * BGOObjects = new ewol::Drawing();
draw::Color basicBG = GetBasicBG();
etk::Color<> basicBG = GetBasicBG();
BGOObjects->SetColor(basicBG);
BGOObjects->SetPos(vec3(0, 0, 0) );
BGOObjects->RectangleWidth(vec3(m_size.x(), m_size.y(), 0) );
@ -180,8 +180,8 @@ void widget::List::OnRegenerateDisplay(void)
for(int32_t iii=startRaw; iii<nbRaw && displayPositionY >= 0; iii++) {
m_nbVisibleRaw++;
etk::UString myTextToWrite;
draw::Color fg;
draw::Color bg;
etk::Color<> fg;
etk::Color<> bg;
GetElement(jjj, iii, myTextToWrite, fg, bg);
ewol::Text * tmpText = new ewol::Text();

View File

@ -10,7 +10,7 @@
#define __EWOL_LIST_H__
#include <etk/types.h>
#include <draw/Color.h>
#include <etk/Color.h>
#include <ewol/debug.h>
#include <ewol/widget/WidgetScrolled.h>
#include <ewol/compositing/Compositing.h>
@ -41,32 +41,31 @@ namespace widget {
int32_t m_nbVisibleRaw; // set the number of visible raw (calculate don display)
protected:
// function call to display the list :
virtual draw::Color GetBasicBG(void) {
draw::Color bg(0xFFFFFFFF);
return bg;
virtual etk::Color<> GetBasicBG(void) {
return etk::Color<>(0xFFFFFFFF);
}
virtual uint32_t GetNuberOfColomn(void) {
return 1;
};
virtual bool GetTitle(int32_t colomn, etk::UString &myTitle, draw::Color &fg, draw::Color &bg) {
myTitle = "";
virtual bool GetTitle(int32_t _colomn, etk::UString& _myTitle, etk::Color<> &_fg, etk::Color<> &_bg) {
_myTitle = "";
return false;
};
virtual uint32_t GetNuberOfRaw(void) {
return 0;
};
virtual bool GetElement(int32_t colomn, int32_t raw, etk::UString &myTextToWrite, draw::Color &fg, draw::Color &bg) {
myTextToWrite = "";
bg = 0xFFFFFFFF;
fg = 0x000000FF;
if (raw % 2) {
bg = 0xFFFFFFFF;
virtual bool GetElement(int32_t _colomn, int32_t _raw, etk::UString &_myTextToWrite, etk::Color<> &_fg, etk::Color<> &_bg) {
_myTextToWrite = "";
_bg = 0xFFFFFFFF;
_fg = 0x000000FF;
if (_raw % 2) {
_bg = 0xFFFFFFFF;
} else {
bg = 0x7F7F7FFF;
_bg = 0x7F7F7FFF;
}
return false;
};
virtual bool OnItemEvent(int32_t IdInput, ewol::keyEvent::status_te typeEvent, int32_t colomn, int32_t raw, float x, float y) {
virtual bool OnItemEvent(int32_t _IdInput, ewol::keyEvent::status_te _typeEvent, int32_t _colomn, int32_t _raw, float _x, float _y) {
return false;
}
/**

View File

@ -50,16 +50,15 @@ widget::ListFileSystem::~ListFileSystem(void)
}
};
draw::Color widget::ListFileSystem::GetBasicBG(void) {
draw::Color bg(0x00000010);
return bg;
etk::Color<> widget::ListFileSystem::GetBasicBG(void) {
return etk::Color<>(0x00000010);
}
void widget::ListFileSystem::RegenerateView(void)
{
// clean the list of files :
for (int32_t iii=0; iii<m_list.Size(); iii++) {
for (esize_t iii=0; iii<m_list.Size(); iii++) {
if (NULL != m_list[iii]) {
delete(m_list[iii]);
m_list[iii] = NULL;
@ -76,34 +75,34 @@ void widget::ListFileSystem::RegenerateView(void)
MarkToRedraw();
}
void widget::ListFileSystem::SetShowHiddenFiles(bool state)
void widget::ListFileSystem::SetShowHiddenFiles(bool _state)
{
m_showHidden = state;
m_showHidden = _state;
RegenerateView();
}
void widget::ListFileSystem::SetShowTemporaryFiles(bool state)
void widget::ListFileSystem::SetShowTemporaryFiles(bool _state)
{
m_showTemporaryFile = state;
m_showTemporaryFile = _state;
RegenerateView();
}
void widget::ListFileSystem::SetShowFiles(bool state)
void widget::ListFileSystem::SetShowFiles(bool _state)
{
m_showFile = state;
m_showFile = _state;
RegenerateView();
}
void widget::ListFileSystem::SetShowFolder(bool state)
void widget::ListFileSystem::SetShowFolder(bool _state)
{
m_showFolder = state;
m_showFolder = _state;
RegenerateView();
}
void widget::ListFileSystem::SetFolder(etk::UString newFolder)
void widget::ListFileSystem::SetFolder(etk::UString _newFolder)
{
m_folder = newFolder;
m_folder = _newFolder;
RegenerateView();
}
@ -126,13 +125,13 @@ etk::UString widget::ListFileSystem::GetSelect(void)
}
// select the specific file
void widget::ListFileSystem::SetSelect( etk::UString data) {
void widget::ListFileSystem::SetSelect( etk::UString _data) {
// remove selected line
m_selectedLine = -1;
// search the coresponding file :
for (int32_t iii=0; iii<m_list.Size(); iii++) {
if (NULL!=m_list[iii]) {
if (m_list[iii]->GetNameFile() == data) {
if (m_list[iii]->GetNameFile() == _data) {
// we find the line :
m_selectedLine = iii;
break;
@ -145,8 +144,8 @@ void widget::ListFileSystem::SetSelect( etk::UString data) {
uint32_t widget::ListFileSystem::GetNuberOfColomn(void) {
return 1;
};
bool widget::ListFileSystem::GetTitle(int32_t colomn, etk::UString &myTitle, draw::Color &fg, draw::Color &bg) {
myTitle = "title";
bool widget::ListFileSystem::GetTitle(int32_t _colomn, etk::UString &_myTitle, etk::Color<>& _fg, etk::Color<>& _bg) {
_myTitle = "title";
return true;
};
uint32_t widget::ListFileSystem::GetNuberOfRaw(void)
@ -157,55 +156,55 @@ uint32_t widget::ListFileSystem::GetNuberOfRaw(void)
}
return m_list.Size() + offset;
};
bool widget::ListFileSystem::GetElement(int32_t colomn, int32_t raw, etk::UString &myTextToWrite, draw::Color &fg, draw::Color &bg)
bool widget::ListFileSystem::GetElement(int32_t _colomn, int32_t _raw, etk::UString& _myTextToWrite, etk::Color<>& _fg, etk::Color<>& _bg)
{
int32_t offset = 0;
if (true == m_showFolder) {
offset = 2;
if (raw==0) {
myTextToWrite = ".";
} else if (raw==1) {
myTextToWrite = "..";
if (_raw==0) {
_myTextToWrite = ".";
} else if (_raw==1) {
_myTextToWrite = "..";
}
}
if( raw-offset >= 0
&& raw-offset < m_list.Size()
&& NULL != m_list[raw-offset]) {
if( _raw-offset >= 0
&& _raw-offset < m_list.Size()
&& NULL != m_list[_raw-offset]) {
/*if (etk::FSN_FILE == m_list[raw-offset]->GetNodeType()) {
myTextToWrite = m_list[raw-offset]->GetRight().GetRight();
myTextToWrite += " ";
myTextToWrite += m_list[raw-offset]->GetNameFile();
} else */{
myTextToWrite = m_list[raw-offset]->GetNameFile();
_myTextToWrite = m_list[_raw-offset]->GetNameFile();
}
}
fg = draw::color::black;
if (raw % 2) {
bg = 0xFFFFFF00;
_fg = etk::color::black;
if (_raw % 2) {
_bg = 0xFFFFFF00;
} else {
bg = 0xBFBFBFFF;
_bg = 0xBFBFBFFF;
}
if (m_selectedLine == raw) {
bg = 0x8F8FFFFF;
if (m_selectedLine == _raw) {
_bg = 0x8F8FFFFF;
}
return true;
};
bool widget::ListFileSystem::OnItemEvent(int32_t IdInput, ewol::keyEvent::status_te typeEvent, int32_t colomn, int32_t raw, float x, float y)
bool widget::ListFileSystem::OnItemEvent(int32_t _IdInput, ewol::keyEvent::status_te _typeEvent, int32_t _colomn, int32_t _raw, float _x, float _y)
{
int32_t offset = 0;
if (true == m_showFolder) {
offset = 2;
}
if (typeEvent == ewol::keyEvent::statusSingle) {
EWOL_INFO("Event on List : IdInput=" << IdInput << " colomn=" << colomn << " raw=" << raw );
if (1 == IdInput) {
if (_typeEvent == ewol::keyEvent::statusSingle) {
EWOL_INFO("Event on List : IdInput=" << _IdInput << " colomn=" << _colomn << " raw=" << _raw );
if (1 == _IdInput) {
int32_t previousRaw = m_selectedLine;
if (raw > m_list.Size()+offset ) {
if (_raw > m_list.Size()+offset ) {
m_selectedLine = -1;
} else {
m_selectedLine = raw;
m_selectedLine = _raw;
}
if (previousRaw != m_selectedLine) {
if( true == m_showFolder

View File

@ -22,42 +22,36 @@ namespace widget {
{
private:
etk::Vector<etk::FSNode *> m_list;
etk::UString m_folder;
int32_t m_selectedLine;
bool m_showFile;
bool m_showTemporaryFile;
bool m_showFolder;
bool m_showHidden;
etk::UString m_folder;
int32_t m_selectedLine;
bool m_showFile;
bool m_showTemporaryFile;
bool m_showFolder;
bool m_showHidden;
public:
ListFileSystem(void);
~ListFileSystem(void);
// Derived function
virtual draw::Color GetBasicBG(void);
// Derived function
virtual etk::Color<> GetBasicBG(void);
uint32_t GetNuberOfColomn(void);
// Derived function
bool GetTitle(int32_t colomn, etk::UString &myTitle, draw::Color &fg, draw::Color &bg);
// Derived function
bool GetTitle(int32_t _colomn, etk::UString& _myTitle, etk::Color<>& _fg, etk::Color<>& _bg);
uint32_t GetNuberOfRaw(void);
// Derived function
bool GetElement(int32_t colomn, int32_t raw, etk::UString &myTextToWrite, draw::Color &fg, draw::Color &bg);
// Derived function
bool OnItemEvent(int32_t IdInput, ewol::keyEvent::status_te typeEvent, int32_t colomn, int32_t raw, float x, float y);
// Derived function
bool GetElement(int32_t _colomn, int32_t _raw, etk::UString& _myTextToWrite, etk::Color<>& _fg, etk::Color<>& _bg);
bool OnItemEvent(int32_t _IdInput, ewol::keyEvent::status_te _typeEvent, int32_t _colomn, int32_t _raw, float _x, float _y);
const char * const GetObjectType(void) { return "EwolListFileSystem"; };
public:
// extern API :
void SetFolder(etk::UString newFolder);
void SetFolder(etk::UString _newFolder);
etk::UString GetFolder(void);
// select the specific file
void SetSelect(etk::UString data);
void SetSelect(etk::UString _data);
etk::UString GetSelect(void);
// regenerate the view ....
void RegenerateView(void);
void SetShowFiles(bool state);
void SetShowFolder(bool state);
void SetShowHiddenFiles(bool state);
void SetShowTemporaryFiles(bool state);
void RegenerateView(void);
void SetShowFiles(bool _state);
void SetShowFolder(bool _state);
void SetShowHiddenFiles(bool _state);
void SetShowTemporaryFiles(bool _state);
};
};

View File

@ -10,7 +10,6 @@
#define __EWOL_POP_UP_H__
#include <etk/types.h>
#include <draw/Color.h>
#include <ewol/debug.h>
#include <ewol/widget/Widget.h>
#include <ewol/widget/Container.h>

View File

@ -36,12 +36,12 @@ widget::ProgressBar::ProgressBar(void)
{
m_value = 0.0;
m_textColorFg = draw::color::black;
m_textColorFg = etk::color::black;
m_textColorBgOn = 0x00FF00FF;
m_textColorBgOff = draw::color::black;
m_textColorBgOff.a = 0x3F;
m_textColorBgOff = etk::color::black;
m_textColorBgOff.SetA(0x3F);
SetCanHaveFocus(true);
}

View File

@ -10,7 +10,7 @@
#define __EWOL_PROGRESS_BAR_H__
#include <etk/types.h>
#include <draw/Color.h>
#include <etk/Color.h>
#include <ewol/debug.h>
#include <ewol/widget/Widget.h>
#include <ewol/compositing/Drawing.h>
@ -29,12 +29,12 @@ namespace widget {
virtual ~ProgressBar(void);
void ValueSet(float val);
float ValueGet(void);
void SetColor(draw::Color newColor) { m_textColorFg = newColor; };
void SetColor(etk::Color<> _newColor) { m_textColorFg = _newColor; };
private:
float m_value; //!< % used
draw::Color m_textColorFg; //!< forder bar color
draw::Color m_textColorBgOn; //!< bar color enable
draw::Color m_textColorBgOff; //!< bar color disable
etk::Color<> m_textColorFg; //!< forder bar color
etk::Color<> m_textColorBgOn; //!< bar color enable
etk::Color<> m_textColorBgOff; //!< bar color disable
protected: // Derived function
virtual void OnDraw(void);
public: // Derived function

View File

@ -47,10 +47,10 @@ widget::Slider::Slider(void)
m_min = 0;
m_max = 10;
m_textColorFg = draw::color::black;
m_textColorFg = etk::color::black;
m_textColorBg = draw::color::black;
m_textColorBg.a = 0x3F;
m_textColorBg = etk::color::black;
m_textColorBg.SetA(0x3F);
SetCanHaveFocus(true);
// Limit event at 1:
SetMouseLimit(1);
@ -115,8 +115,8 @@ void widget::Slider::OnRegenerateDisplay(void)
tmpDraw->LineTo(vec3(m_size.x()-dotRadius, m_size.y()/2, 0) );
tmpDraw->SetThickness(0);
draw::Color borderDot = m_textColorFg;
borderDot.a /= 2;
etk::Color<> borderDot = m_textColorFg;
borderDot.SetA(borderDot.a()/2);
tmpDraw->SetPos(vec3(4+((float)(m_value-m_min)/(float)(m_max-m_min))*(float)(m_size.x()-2*dotRadius), m_size.y()/2, 0) );
tmpDraw->SetColorBg(borderDot);
tmpDraw->Circle(dotRadius);

View File

@ -10,7 +10,7 @@
#define __EWOL_SLIDER_H__
#include <etk/types.h>
#include <draw/Color.h>
#include <etk/Color.h>
#include <ewol/debug.h>
#include <ewol/widget/Drawable.h>
@ -29,13 +29,13 @@ namespace widget {
int32_t GetValue(void);
void SetMin(int32_t val);
void SetMax(int32_t val);
void SetColor(draw::Color newColor) { m_textColorFg = newColor; };
void SetColor(etk::Color<> newColor) { m_textColorFg = newColor; };
private:
int32_t m_value;
int32_t m_min;
int32_t m_max;
draw::Color m_textColorFg; //!< Text color
draw::Color m_textColorBg; //!< Background color
etk::Color<> m_textColorFg; //!< Text color
etk::Color<> m_textColorBg; //!< Background color
public:
// Derived function
virtual const char * const GetObjectType(void) { return "Ewol::Slider"; } ;

View File

@ -37,8 +37,8 @@ widget::Spacer::Spacer(void)
{
m_userMinSize = ewol::Dimension(vec2(10,10));
SetCanHaveFocus(false);
m_color = draw::color::black;
m_color.a = 0;
m_color = etk::color::black;
m_color.SetA(0);
RegisterConfig(configColor, "color", NULL, "background of the spacer");
}
@ -61,7 +61,7 @@ void widget::Spacer::OnRegenerateDisplay(void)
}
m_draw.Clear();
if (m_color.a == 0) {
if (m_color.a() == 0) {
return;
}
m_draw.SetColor(m_color);
@ -75,7 +75,7 @@ bool widget::Spacer::OnSetConfig(const ewol::EConfig& _conf)
return true;
}
if (_conf.GetConfig() == configColor) {
draw::ParseColor(_conf.GetData().c_str(), m_color);
m_color = _conf.GetData();
MarkToRedraw();
return true;
}
@ -88,7 +88,7 @@ bool widget::Spacer::OnGetConfig(const char* _config, etk::UString& _result) con
return true;
}
if (_config == configColor) {
_result = draw::GetString(m_color);
_result = m_color.GetString();
return true;
}
return false;

View File

@ -10,7 +10,7 @@
#define __EWOL_SPACER_H__
#include <etk/types.h>
#include <draw/Color.h>
#include <etk/Color.h>
#include <ewol/debug.h>
#include <ewol/widget/Widget.h>
#include <ewol/compositing/Drawing.h>
@ -35,17 +35,17 @@ namespace widget {
*/
virtual ~Spacer(void);
protected:
draw::Color m_color; //!< Background color
etk::Color<> m_color; //!< Background color
public:
/**
* @brief Spziby the background color (basicly transparent)
* @param[in] newColor the display background color
*/
void SetColor(draw::Color newColor) { m_color = newColor; MarkToRedraw(); };
void SetColor(etk::Color<> _newColor) { m_color = _newColor; MarkToRedraw(); };
public:
// Derived function
virtual const char * const GetObjectType(void) { return "ewol::spacer"; };
virtual ewol::Widget * GetWidgetAtPos(const vec2& pos) { return NULL; };
virtual ewol::Widget * GetWidgetAtPos(const vec2& _pos) { return NULL; };
virtual void OnRegenerateDisplay(void);
virtual void OnDraw(void);
virtual bool OnSetConfig(const ewol::EConfig& _conf);

View File

@ -54,8 +54,8 @@ widget::ColorChooser::ColorChooser(void) :
*/
SubWidgetAdd(m_widgetColorBar);
draw::Color sliderColor;
sliderColor = draw::color::black;
etk::Color<> sliderColor;
sliderColor = etk::color::black;
m_widgetRed = new widget::Slider();
m_widgetRed->RegisterOnEvent(this, ewolEventSliderChange, eventColorSpecificHasChange);
@ -92,7 +92,7 @@ widget::ColorChooser::ColorChooser(void) :
m_widgetAlpha->SetMax(255);
SubWidgetAdd(m_widgetAlpha);
m_currentColor = draw::color::white;
m_currentColor = etk::color::white;
}
@ -102,20 +102,20 @@ widget::ColorChooser::~ColorChooser(void)
}
void widget::ColorChooser::SetColor(draw::Color newColor)
void widget::ColorChooser::SetColor(etk::Color<> _newColor)
{
m_currentColor = newColor;
m_currentColor = _newColor;
if (NULL != m_widgetRed) {
m_widgetRed->SetValue(m_currentColor.r);
m_widgetRed->SetValue(m_currentColor.r());
}
if (NULL != m_widgetGreen) {
m_widgetGreen->SetValue(m_currentColor.g);
m_widgetGreen->SetValue(m_currentColor.g());
}
if (NULL != m_widgetBlue) {
m_widgetBlue->SetValue(m_currentColor.b);
m_widgetBlue->SetValue(m_currentColor.b());
}
if (NULL != m_widgetAlpha) {
m_widgetAlpha->SetValue(m_currentColor.a);
m_widgetAlpha->SetValue(m_currentColor.a());
}
if (NULL != m_widgetColorBar) {
m_widgetColorBar->SetCurrentColor(m_currentColor);
@ -123,7 +123,7 @@ void widget::ColorChooser::SetColor(draw::Color newColor)
}
draw::Color widget::ColorChooser::GetColor(void)
etk::Color<> widget::ColorChooser::GetColor(void)
{
return m_currentColor;
}
@ -137,43 +137,43 @@ void widget::ColorChooser::OnReceiveMessage(const ewol::EMessage& _msg)
//EWOL_INFO("Receive Extern Event ... : widgetPointer=" << CallerObject << "\"" << eventId << "\" ==> data=\"" << data << "\"" );
if (eventColorBarHasChange == _msg.GetMessage()) {
//==> colorBar has change ...
uint8_t tmpAlpha = m_currentColor.a;
uint8_t tmpAlpha = m_currentColor.a();
// the colorbar has no notion of the alpha ==> keep it ...
if (NULL != m_widgetColorBar) {
m_currentColor = m_widgetColorBar->GetCurrentColor();
}
m_currentColor.a = tmpAlpha;
m_currentColor.SetA(tmpAlpha);
if (NULL != m_widgetRed) {
m_widgetRed->SetValue(m_currentColor.r);
m_widgetRed->SetValue(m_currentColor.r());
}
if (NULL != m_widgetGreen) {
m_widgetGreen->SetValue(m_currentColor.g);
m_widgetGreen->SetValue(m_currentColor.g());
}
if (NULL != m_widgetBlue) {
m_widgetBlue->SetValue(m_currentColor.b);
m_widgetBlue->SetValue(m_currentColor.b());
}
if (NULL != m_widgetAlpha) {
m_widgetAlpha->SetValue(m_currentColor.a);
m_widgetAlpha->SetValue(m_currentColor.a());
}
GenerateEventId(ewolEventColorChooserChange, draw::GetString(m_currentColor));
GenerateEventId(ewolEventColorChooserChange, m_currentColor.GetString());
} else if (eventColorSpecificHasChange == _msg.GetMessage()) {
// Slider has changes his color ==> get the one change ...
if (_msg.GetCaller() == m_widgetRed) {
m_currentColor.r = m_widgetRed->GetValue();
m_currentColor.SetR(m_widgetRed->GetValue());
}
if (_msg.GetCaller() == m_widgetGreen) {
m_currentColor.g = m_widgetGreen->GetValue();
m_currentColor.SetG(m_widgetGreen->GetValue());
}
if (_msg.GetCaller() == m_widgetBlue) {
m_currentColor.b = m_widgetBlue->GetValue();
m_currentColor.SetB(m_widgetBlue->GetValue());
}
if (_msg.GetCaller() == m_widgetAlpha) {
m_currentColor.a = m_widgetAlpha->GetValue();
m_currentColor.SetA(m_widgetAlpha->GetValue());
}
if (NULL != m_widgetColorBar) {
m_widgetColorBar->SetCurrentColor(m_currentColor);
}
GenerateEventId(ewolEventColorChooserChange, draw::GetString(m_currentColor));
GenerateEventId(ewolEventColorChooserChange, m_currentColor.GetString());
}
};

View File

@ -34,15 +34,15 @@ namespace widget {
// Derived function
virtual void OnObjectRemove(ewol::EObject* _removeObject);
void SetColor(draw::Color newColor);
draw::Color GetColor(void);
void SetColor(etk::Color<> newColor);
etk::Color<> GetColor(void);
private:;
widget::ColorBar* m_widgetColorBar;
widget::Slider* m_widgetRed;
widget::Slider* m_widgetGreen;
widget::Slider* m_widgetBlue;
widget::Slider* m_widgetAlpha;
draw::Color m_currentColor;
etk::Color<> m_currentColor;
};
};

View File

@ -157,7 +157,7 @@ void widget::ParameterList::OnRegenerateDisplay(void)
for(int32_t iii=startRaw; iii<nbRaw && iii<(startRaw+displayableRaw); iii++) {
etk::UString myTextToWrite = "???";
draw::Color fg(0x000000FF);
etk::Color<> fg(0x000000FF);
if (m_list[iii] != NULL) {
myTextToWrite = m_list[iii]->m_label;
}

View File

@ -55,8 +55,6 @@ def Create(target):
'ewol/renderer/resources/Texture.cpp',
'ewol/renderer/resources/Colored3DObject.cpp',
'ewol/renderer/resources/Image.cpp',
'ewol/renderer/resources/image/ImageBMP.cpp',
'ewol/renderer/resources/image/ImagePNG.cpp',
'ewol/renderer/ResourceManager.cpp'])
# Audio system
@ -139,7 +137,7 @@ def Create(target):
#myModule.SetConfig(['Config.in','ConfigLinux.in'])
# name of the dependency
myModule.AddModuleDepend(['etk', 'freetype', 'png', 'esvg', 'date'])
myModule.AddModuleDepend(['etk', 'freetype', 'exml', 'egami', 'date'])
#ifeq ("$(CONFIG_BUILD_BULLET)","y")
#myModule.AddModuleDepend('bullet')