2010-07-28 5 views
0

mt4j 멀티 터치 Java 라이브러리 예제를 사용하고 있는데 "advanced.drawing"예제에서 drawingScene의 배경색을 변경하려고합니다. setClear를 false로 설정 했으므로 clearColor 옵션을 사용하여 설정할 수 없습니다. 다른 아이디어? 감사합니다.mt4j의 배경색을 분명히 변경하지 않고

답변

0

NUIGroup 포럼의 TherioN 도움을 받아 보았습니다. 채우기 색으로 MTRectangle을 추가 한 다음 그림 예제의 SceneTexture를 해당 사각형에 추가 할 수 있습니다. 코드 조각을 참조 용으로 작성했습니다.

final MTSceneTexture sceneTexture = new MTSceneTexture(mtApplication,0, 0, mtApplication.width, mtApplication.height, drawingScene); 
    sceneTexture.getFbo().clear(true, 255, 255, 255, 0, true);   
    sceneTexture.setStrokeColor(new MTColor(155,155,155)); 

    //Background 
    MTRectangle background = new MTRectangle(0,0,mtApplication.width, mtApplication.height , mtApplication); 
    background.setFillColor(new MTColor(255,244,150,255)); 

    //Add the scene texture as a child of the background rectangle so the scene texture is drawn in front 
    background.addChild(sceneTexture); 
    frame.addChild(background); 
관련 문제