Package org.mt4j.util

Examples of org.mt4j.util.MTColor


          this.drawPureGl(gl);
        }
        ((PGraphicsOpenGL)renderer.g).endGL();
    }else{
      //Draw with processing
      MTColor strokeColor = this.getStrokeColor();
      pContext.stroke(strokeColor.getR(), strokeColor.getG(), strokeColor.getB(), strokeColor.getAlpha());
      pContext.strokeWeight(this.getStrokeWeight());
     
      if (this.isDrawSmooth())
        pContext.smooth();
      else  
View Full Code Here


      }
    });
   
//    knob = new MTRectangle(x+innerOffset, y+innerOffset,   knobWidth, knobHeight, applet);
    knob = new MTEllipse(applet,  new Vector3D(0,0,0), knobWidth*0.5f, knobHeight*0.5f);
    knob.setFillColor(new MTColor(140, 140, 140, 255));
    AbstractComponentProcessor[] inputPs = knob.getInputProcessors();
    for (int i = 0; i < inputPs.length; i++) {
      AbstractComponentProcessor p = inputPs[i];
      if (!(p instanceof DragProcessor)){
        knob.unregisterInputProcessor(p);
View Full Code Here

    final MTCamera camManager = new MTCamera(mtAppl);
    this.setSceneCam(camManager);
    this.getSceneCam().setZoomMinDistance(80);
   
//    this.setClearColor(new MTColor(135, 206, 250, 255));
    this.setClearColor(new MTColor(70, 70, 72, 255));
   
    //Show touches
    this.registerGlobalInputProcessor(new CursorTracer(mtAppl, this));
   
    //Add multitouch gestures to the canvas background
    lassoProcessor  = new LassoProcessor(app, this.getCanvas(), this.getSceneCam());
    this.getCanvas().registerInputProcessor(lassoProcessor);
    this.getCanvas().addGestureListener(LassoProcessor.class, new DefaultLassoAction(app, this.getCanvas().getClusterManager(), this.getCanvas()));
   
    this.getCanvas().registerInputProcessor(new PanProcessorTwoFingers(app));
    this.getCanvas().addGestureListener(PanProcessorTwoFingers.class, new DefaultPanAction());

    this.getCanvas().registerInputProcessor(new ZoomProcessor(app));
    this.getCanvas().addGestureListener(ZoomProcessor.class, new DefaultZoomAction());
   
    pictureLayer = new MTComponent(app);
   
    MTComponent topLayer = new MTComponent(app, "top layer group", new MTCamera(app));
   
    //Load from file system
//    PImage keyboardImg = app.loadImage(System.getProperty("user.dir")+File.separator + "examples"+  File.separator +"advanced"+ File.separator+ File.separator + "flickrMT"+ File.separator +  File.separator + "data"+ File.separator
////    + "keyb2.png");
//    + "keyb128.png");
    //Load from classpath
    PImage keyboardImg = app.loadImage("advanced" + MTApplication.separator + "flickrMT"+ MTApplication.separator + "data"+ MTApplication.separator
//        + "keyb2.png");
        + "keyb128.png");
   
    final MTImageButton keyboardButton = new MTImageButton(keyboardImg, app);
    keyboardButton.setFillColor(new MTColor(255,255,255,200));
    keyboardButton.setName("KeyboardButton");
    keyboardButton.setNoStroke(true);
//    keyboardButton.translateGlobal(new Vector3D(5,5,0));
    keyboardButton.translateGlobal(new Vector3D(-2,app.height-keyboardButton.getWidthXY(TransformSpace.GLOBAL)+2,0));
    topLayer.addChild(keyboardButton);

//    progressBar = new MTProgressBar(app, app.loadFont(MT4jSettings.getInstance().getDefaultFontPath()+ "Ziggurat.vlw"));
    progressBar = new MTProgressBar(app, app.createFont("arial", 18));
   
    progressBar.setDepthBufferDisabled(true);
    progressBar.setVisible(false);
    topLayer.addChild(progressBar);
   
    keyboardButton.addActionListener(new ActionListener(){
      public void actionPerformed(ActionEvent ae) {
        switch (ae.getID()) {
        case TapEvent.BUTTON_CLICKED:
          //Flickr Keyboard
              MTKeyboard keyb = new MTKeyboard(app);
              keyb.setFillColor(new MTColor(30, 30, 30, 210));
              keyb.setStrokeColor(new MTColor(0,0,0,255));
             
              final MTTextArea t = new MTTextArea(app, FontManager.getInstance().createFont(app, "arial.ttf", 50,
                  new MTColor(0,0,0,255), //Fill color
              new MTColor(0,0,0,255))); //Stroke color
              t.setExpandDirection(ExpandDirection.UP);
          t.setStrokeColor(new MTColor(0,0 , 0, 255));
          t.setFillColor(new MTColor(205,200,177, 255));
          t.unregisterAllInputProcessors();
          t.setEnableCaret(true);
          t.snapToKeyboard(keyb);
          keyb.addTextInputListener(t);
             
View Full Code Here

    switch (e.getKeyCode()){
    case KeyEvent.VK_BACK_SPACE:
      app.popScene();
      break;
    case KeyEvent.VK_F1:
      this.setClearColor(new MTColor(100, 99, 99, 255));
      break;
    case KeyEvent.VK_F2:
      this.setClearColor(new MTColor(120, 119, 119, 255));
      break;
    case KeyEvent.VK_F3:
      this.setClearColor(new MTColor(130, 129, 129, 255));
      break;
    case KeyEvent.VK_F4:
      this.setClearColor(new MTColor(160, 159, 159, 255));
      break;
    case KeyEvent.VK_F5:
      this.setClearColor(new MTColor(180, 179, 179, 255));
      break;
    case KeyEvent.VK_F6:
      this.setClearColor(new MTColor(100, 100, 102, 255));
      break;
    case KeyEvent.VK_F7:
      this.setClearColor(new MTColor(70, 70, 72, 255));
      break;
    case KeyEvent.VK_F:
      System.out.println("FPS: " + app.frameRate);
      break;
      default:
View Full Code Here

  private MTApplication app;
 
  public MTGesturesExampleScene(MTApplication mtApplication, String name) {
    super(mtApplication, name);
    this.app = mtApplication;
    this.setClearColor(new MTColor(126, 130, 168, 255));
    this.registerGlobalInputProcessor(new CursorTracer(app, this));

    float verticalPad = 53;
    float horizontalPad = 500;
   
    MTColor white = new MTColor(255,255,255);
    final MTColor textAreaColor = new MTColor(50,50,50,255);
   
    IFont font = FontManager.getInstance().createFont(app, "arial.ttf", 35, white, white);
   
    //Add canvas background gestures
    //Zoom gesture
    MTTextArea backgroundZoom = new MTTextArea(mtApplication, font);
    backgroundZoom.setFillColor(new MTColor(150,150,150));
    backgroundZoom.setNoFill(true);
    backgroundZoom.setNoStroke(true);
    backgroundZoom.setText("Zoom anywhere on the background!");
    backgroundZoom.setPickable(false);
    this.getCanvas().addChild(backgroundZoom);
    backgroundZoom.setPositionGlobal(new Vector3D(app.width/2f, app.height/2f,0));
    getCanvas().registerInputProcessor(new ZoomProcessor(app));
    getCanvas().addGestureListener(ZoomProcessor.class, new DefaultZoomAction());
   
    //2 finger pan gesture
    MTTextArea backgroundPan = new MTTextArea(mtApplication, font);
    backgroundPan.setFillColor(new MTColor(150,150,150));
    backgroundPan.setNoFill(true);
    backgroundPan.setNoStroke(true);
    backgroundPan.setText("Pan anywhere on the background!");
    backgroundPan.setPickable(false);
    this.getCanvas().addChild(backgroundPan);
    backgroundPan.setPositionGlobal(new Vector3D(app.width/2f, app.height/2f + 1*verticalPad,0));
    getCanvas().registerInputProcessor(new PanProcessorTwoFingers(app));
    getCanvas().addGestureListener(PanProcessorTwoFingers.class, new DefaultPanAction());
   
    //Add component multi-touch gestures
    MTTextArea dragOnly = new MTTextArea(mtApplication, font);
    dragOnly.setFillColor(textAreaColor);
    dragOnly.setStrokeColor(textAreaColor);
    dragOnly.setText("Drag me!");
    this.clearAllGestures(dragOnly);
    dragOnly.registerInputProcessor(new DragProcessor(app));
    dragOnly.addGestureListener(DragProcessor.class, new DefaultDragAction());
    dragOnly.addGestureListener(DragProcessor.class, new InertiaDragAction()); //Add inertia to dragging
    this.getCanvas().addChild(dragOnly);
   
    MTTextArea rotateOnly = new MTTextArea(mtApplication, font);
    rotateOnly.setFillColor(textAreaColor);
    rotateOnly.setStrokeColor(textAreaColor);
    rotateOnly.setText("Rotate me!");
    this.clearAllGestures(rotateOnly);
    rotateOnly.registerInputProcessor(new RotateProcessor(app));
    rotateOnly.addGestureListener(RotateProcessor.class, new DefaultRotateAction());
    this.getCanvas().addChild(rotateOnly);
    rotateOnly.setAnchor(PositionAnchor.UPPER_LEFT);
    rotateOnly.setPositionGlobal(new Vector3D(0, verticalPad,0));
   
    MTTextArea scaleOnly = new MTTextArea(mtApplication, font);
    scaleOnly.setFillColor(textAreaColor);
    scaleOnly.setStrokeColor(textAreaColor);
    scaleOnly.setText("Scale me!");
    this.clearAllGestures(scaleOnly);
    scaleOnly.registerInputProcessor(new ScaleProcessor(app));
    scaleOnly.addGestureListener(ScaleProcessor.class, new DefaultScaleAction());
    this.getCanvas().addChild(scaleOnly);
    scaleOnly.setAnchor(PositionAnchor.UPPER_LEFT);
    scaleOnly.setPositionGlobal(new Vector3D(0, 2*verticalPad,0));
   
    MTTextArea dragAndRotate = new MTTextArea(mtApplication, font);
    dragAndRotate.setFillColor(textAreaColor);
    dragAndRotate.setStrokeColor(textAreaColor);
    dragAndRotate.setText("Drag and Rotate me!");
    this.clearAllGestures(dragAndRotate);
    dragAndRotate.registerInputProcessor(new RotateProcessor(app));
    dragAndRotate.addGestureListener(RotateProcessor.class, new DefaultRotateAction());
    dragAndRotate.registerInputProcessor(new DragProcessor(app));
    dragAndRotate.addGestureListener(DragProcessor.class, new DefaultDragAction());
    this.getCanvas().addChild(dragAndRotate);
    dragAndRotate.setAnchor(PositionAnchor.UPPER_LEFT);
    dragAndRotate.setPositionGlobal(new Vector3D(0, 3*verticalPad,0));
   
    MTTextArea dragAndScale = new MTTextArea(mtApplication, font);
    dragAndScale.setFillColor(textAreaColor);
    dragAndScale.setStrokeColor(textAreaColor);
    dragAndScale.setText("Drag and Scale me!");
    this.clearAllGestures(dragAndScale);
    dragAndScale.registerInputProcessor(new ScaleProcessor(app));
    dragAndScale.addGestureListener(ScaleProcessor.class, new DefaultScaleAction());
    dragAndScale.registerInputProcessor(new DragProcessor(app));
    dragAndScale.addGestureListener(DragProcessor.class, new DefaultDragAction());
    this.getCanvas().addChild(dragAndScale);
    dragAndScale.setAnchor(PositionAnchor.UPPER_LEFT);
    dragAndScale.setPositionGlobal(new Vector3D(0, 8*verticalPad,0));
   
    MTTextArea rotateAndScale = new MTTextArea(mtApplication, font);
    rotateAndScale.setFillColor(textAreaColor);
    rotateAndScale.setStrokeColor(textAreaColor);
    rotateAndScale.setText("Rotate and Scale me!");
    this.clearAllGestures(rotateAndScale);
    rotateAndScale.registerInputProcessor(new ScaleProcessor(app));
    rotateAndScale.addGestureListener(ScaleProcessor.class, new DefaultScaleAction());
    rotateAndScale.registerInputProcessor(new RotateProcessor(app));
    rotateAndScale.addGestureListener(RotateProcessor.class, new DefaultRotateAction());
    this.getCanvas().addChild(rotateAndScale);
    rotateAndScale.setAnchor(PositionAnchor.UPPER_LEFT);
    rotateAndScale.setPositionGlobal(new Vector3D(0,9*verticalPad,0));
   
    MTTextArea dragRotScale = new MTTextArea(mtApplication, font);
    dragRotScale.setFillColor(textAreaColor);
    dragRotScale.setStrokeColor(textAreaColor);
    dragRotScale.setText("Drag, Rotate and Scale me!");
    this.clearAllGestures(dragRotScale);
    dragRotScale.registerInputProcessor(new ScaleProcessor(app));
    dragRotScale.addGestureListener(ScaleProcessor.class, new DefaultScaleAction());
    dragRotScale.registerInputProcessor(new RotateProcessor(app));
    dragRotScale.addGestureListener(RotateProcessor.class, new DefaultRotateAction());
    dragRotScale.registerInputProcessor(new DragProcessor(app));
    dragRotScale.addGestureListener(DragProcessor.class, new DefaultDragAction());
    this.getCanvas().addChild(dragRotScale);
    dragRotScale.setAnchor(PositionAnchor.UPPER_LEFT);
    dragRotScale.setPositionGlobal(new Vector3D(0,10*verticalPad,0));
   
    //Tap gesture
    final MTTextArea tapOnly = new MTTextArea(mtApplication, font);
    tapOnly.setFillColor(textAreaColor);
    tapOnly.setStrokeColor(textAreaColor);
    tapOnly.setText("Tap me! ---");
    this.clearAllGestures(tapOnly);
    tapOnly.registerInputProcessor(new TapProcessor(app));
    tapOnly.addGestureListener(TapProcessor.class, new IGestureEventListener() {
      public boolean processGestureEvent(MTGestureEvent ge) {
        TapEvent te = (TapEvent)ge;
        switch (te.getId()) {
        case MTGestureEvent.GESTURE_DETECTED:
          tapOnly.setFillColor(new MTColor(220,220,220,255));
          break;
        case MTGestureEvent.GESTURE_UPDATED:
          break;
        case MTGestureEvent.GESTURE_ENDED:
          if (te.isTapped()){
View Full Code Here

    preDrawActions = new ArrayDeque<IPreDrawAction>();
   
    this.registerDefaultGlobalInputProcessors();
   
    this.clearBeforeDraw = true;
    this.setClearColor(new MTColor(0,0,0, 255));
  }
View Full Code Here

   *
   * @param clearColor the new clear color
   */
  public void setClearColor(MTColor clearColor){
    this.clearColor = clearColor;
    this.glClearColor = new MTColor(this.clearColor.getR()/255f, this.clearColor.getG()/255f, this.clearColor.getB()/255f, this.clearColor.getAlpha()/255f);
  }
View Full Code Here

          cluster.addGestureListener(RotateProcessor.class, new DefaultRotateAction());
         
          cluster.registerInputProcessor(new ScaleProcessor(pa));
          cluster.addGestureListener(ScaleProcessor.class,  new DefaultScaleAction());
         
          dse.getSelectionPoly().setFillColor(new MTColor(100,150,250, 50));
         
          dse.getSelectionPoly().setGestureAllowance(DragProcessor.class, true);
          dse.getSelectionPoly().setGestureAllowance(RotateProcessor.class, true);
          dse.getSelectionPoly().setGestureAllowance(ScaleProcessor.class, true);
         
         
          System.out.println("\n" + selectedComps.length + " Selected:");
//          int n = -1;
          int n = Integer.MAX_VALUE;
          //Set all cards selected
          for (IdragClusterable currentComp : selectedComps){
            System.out.print((currentComp).getName() + "  "); //remove later
           
            if (currentComp instanceof MTComponent){//Add selected comps to selection - RIGHT NOW ONLY SUPPORTS INSTANCES OF MTCOMPONENT!
              MTComponent mtCurrentComp = (MTComponent)currentComp;
             
///////////////////////////////             
              // Listen to destroy events of the clustered components, to remove them from
              // the cluster and pack the polygon.
              mtCurrentComp.addStateChangeListener(StateChange.COMPONENT_DESTROYED, new StateChangeListener(){
                public void stateChanged(StateChangeEvent evt) {
                  if (evt.getSource() instanceof MTComponent) {
                    MTComponent sourceComp = (MTComponent) evt.getSource();
                   
                    //Remove component from cluster it is in
                    Cluster clusterOfComponent = clusterMgr.getCluster(sourceComp);
                    if (clusterOfComponent != null){
                      ((IdragClusterable)sourceComp).setSelected(false);
                      //Remvove the component from its former selection
                      clusterOfComponent.removeChild(sourceComp);
                     
                      //System.out.println("Comp destroyed and removed from cluster: " + sourceComp.getName());
                     
                      //remove the former selection from the selectionmanager if it consists only of 1 less components
                      if (clusterOfComponent.getChildCount() <= 2){
                        clusterMgr.removeCluster(clusterOfComponent);
                       
                      }else{
                        //Tighten convex hull of reduced cluster
                        clusterOfComponent.packClusterPolygon();
                      }
                    }
                  }
                }
              });
////////////////////////////////
             
              //Remove comp from former selection if it is in a new selection
              Cluster formerSelection = clusterMgr.getCluster(currentComp);
              if (formerSelection != null){
                formerSelection.removeChild(mtCurrentComp);
                //Remove the former selection from the selectionmanager if it consists only of 1 less components
                if (formerSelection.getChildCount() <= 2){ //2 because the selection polygon is also always in the selection
//                  SceneManager.getInstance().getCurrentScene().getMainCanvas().getSelectionManager().removeSelection(formerSelection);
                  clusterMgr.removeCluster(formerSelection);
                }else{
                  //Tighten convex hull of reduced cluster
                  formerSelection.packClusterPolygon();
                }
              }
             
              //Get the last index of the selected component in the parent list to know where to add the selectionpoly
              if (mtCurrentComp.getParent() != null){
                int indexInParentList = mtCurrentComp.getParent().getChildIndexOf(mtCurrentComp);
//                if (indexInParentList > n){
//                  n = indexInParentList;
//                }
                if (indexInParentList < n){
                  n = indexInParentList;
                }
              }
               
              //ADD components to the selection and set it to selected
              cluster.addChild(mtCurrentComp);
              currentComp.setSelected(true);
            }//if instance mtbasecomp
          }//for
         
          //Draw a convex hull around all selected shapes
          cluster.packClusterPolygon();
          dse.getSelectionPoly().setLineStipple((short)0xDDDD);
          dse.getSelectionPoly().setStrokeColor(new MTColor(0,0,0,255));
         
          //Add the selection poly 1 index after the index of the highest index of the selected components
          if (selectedComps[0] instanceof MTComponent
            && ((MTComponent)selectedComps[0]).getParent() != null){
              MTComponent firstSelectedComp = (MTComponent)selectedComps[0];
View Full Code Here

    MTEllipse displayShape = new CursorEllipse(applet, position, 15, 15);
    displayShape.setPickable(false);
    displayShape.setNoFill(true);
    displayShape.setDrawSmooth(true);
    displayShape.setStrokeWeight(2);
    displayShape.setStrokeColor(new MTColor(100, 130, 220, 255));
    return displayShape;
  }
View Full Code Here

            //Get font FILL
            Value fillOpacValue = CSSUtilities.getComputedStyle(textElement, SVGCSSEngine.FILL_OPACITY_INDEX);
            float computedfillOpac = PaintServer.convertOpacity(fillOpacValue);
            Value fillIndexValue = CSSUtilities.getComputedStyle(textElement, SVGCSSEngine.FILL_INDEX);
            Object fill = SVGLoader.getFillOrStroke(textElement, fillIndexValue, computedfillOpac, ctx);
            MTColor fillColor = new MTColor(150,150,150,255);
            if (fill instanceof java.awt.Color) {
              java.awt.Color color = (Color) fill;
              fillColor.setColor(color.getRed(), color.getGreen(), color.getBlue(), color.getAlpha());
            }

            //Get STROKE
            // Stroke Opacity \\
            Value strokeOpacValue = CSSUtilities.getComputedStyle(textElement, SVGCSSEngine.STROKE_OPACITY_INDEX);
            float computedStrokeOpacity = PaintServer.convertOpacity(strokeOpacValue);
            // Stroke java.awt.Color \\
            Value strokeIndexValue = CSSUtilities.getComputedStyle(textElement, SVGCSSEngine.STROKE_INDEX);
            Object stroke = SVGLoader.getFillOrStroke(textElement, strokeIndexValue, computedStrokeOpacity, ctx);
            MTColor strokeColor = new MTColor(fillColor.getR(), fillColor.getG(), fillColor.getB(), fillColor.getAlpha());
            if (stroke instanceof java.awt.Color) {
              java.awt.Color color = (Color) stroke;
              strokeColor.setColor(color.getRed(), color.getGreen(), color.getBlue(), color.getAlpha());
            }

            //Get the font family
            Value fontFamilyValue = CSSUtilities.getComputedStyle(textElement, SVGCSSEngine.FONT_FAMILY_INDEX);
            String fontFamily = "arial"; //DEFAULT
            if (fontFamilyValue instanceof ListValue) {
              ListValue listValue = (ListValue) fontFamilyValue;
              Value firstValue = listValue.item(0); //Can be a List? -> take only the first one..
              if (firstValue != null)
                fontFamily = firstValue.getStringValue();
            }
            logger.debug("Font family: " + fontFamily);

            IFont font;
            if (useVectorFont)
              //Vector font
              font = FontManager.getInstance().createFont(pa,
                  "arial.ttf", Math.round(fontSize), fillColor, strokeColor);
            else
              //Bitmap font
              font = FontManager.getInstance().createFont(pa,
//                  "Arial", Math.round(fontSize),
                  fontFamily, Math.round(fontSize), fillColor, strokeColor);
//            /*

            IFont fontToUse = font;
            IFont lastUsedFont = fontToUse;
            List<MTTextArea> textAreas = new ArrayList<MTTextArea>();

            AttributedCharacterIterator iter = tNode.getAttributedCharacterIterator();
            if (font != null && iter != null){ //To avoid not loaded fonts or if text ist empty
              for (int i = iter.getBeginIndex(); i < iter.getEndIndex(); i++) {
                char currentChar = iter.setIndex(i);
                Set<Attribute> keys = iter.getAllAttributeKeys();
                Map<Attribute, Object> charAtts = iter.getAttributes();
               
                Object baseLineShift = charAtts.get(SVGTextElementBridge.BASELINE_SHIFT);
                Object paintInfo = charAtts.get(SVGTextElementBridge.PAINT_INFO);

                Object charX = charAtts.get(GVTAttributedCharacterIterator.TextAttribute.X);
                Object charY = charAtts.get(GVTAttributedCharacterIterator.TextAttribute.Y);
                Object charDX = charAtts.get(GVTAttributedCharacterIterator.TextAttribute.DX);
                Object charDY = charAtts.get(GVTAttributedCharacterIterator.TextAttribute.DY);
                Object charRotation = charAtts.get(GVTAttributedCharacterIterator.TextAttribute.ROTATION);
                Object gvtFont = charAtts.get(GVTAttributedCharacterIterator.TextAttribute.GVT_FONT);
                Object gvtFonts = charAtts.get(GVTAttributedCharacterIterator.TextAttribute.GVT_FONTS);
                Object gvtFontFamilies = charAtts.get(GVTAttributedCharacterIterator.TextAttribute.GVT_FONT_FAMILIES);
                Object textCompoundDelimiter = charAtts.get(GVTAttributedCharacterIterator.TextAttribute.TEXT_COMPOUND_DELIMITER);
                Object verticalOrientation = charAtts.get(GVTAttributedCharacterIterator.TextAttribute.VERTICAL_ORIENTATION);
                logger.debug("Character: "  + currentChar + " CharX:" + charX + " CharY: " + charY + " CharDX: " +  charDX + " CharDY: " + charDY +  " Font: " + gvtFont +  " Fonts: " + gvtFonts +   " FontFamilies: " + gvtFontFamilies);
                AWTGVTFont awtGvtFont = (AWTGVTFont)gvtFont;
                if (awtGvtFont != null)
                  logger.debug("CharfontSize: " + awtGvtFont.getSize());

                //FIXME REMOVE, Not working always 0,0
                SVGPoint startPosOfChar = SVGTextContentSupport.getStartPositionOfChar(textElement, i);

                /////////////////////////////////////
                //Get the character information - font, colors
                String newFamilyName = new String(fontFamily);
                float newFontSize = fontSize;
                MTColor newFillColor = new MTColor(fillColor);
                MTColor newStrokeColor = new MTColor(strokeColor);
                boolean charHasColorInfo = false;
                boolean charHasFontInfo = false;
                //Get chars paint info
                if (paintInfo != null && paintInfo instanceof TextPaintInfo){
                  charHasColorInfo = true;
                  TextPaintInfo texInfo = (TextPaintInfo)paintInfo;
                  if (texInfo.fillPaint instanceof java.awt.Color){
                    java.awt.Color color = (Color)texInfo.fillPaint;
                    newFillColor.setColor(color.getRed(), color.getGreen(), color.getBlue(), color.getAlpha());
                  }
                  if (texInfo.strokePaint instanceof java.awt.Color){
                    java.awt.Color color = (Color)texInfo.strokePaint;
                    newStrokeColor.setColor(color.getRed(), color.getGreen(), color.getBlue(), color.getAlpha());
                  }
                }

                //Get the chars font family and size
                GVTFont aGvtFont = null;
View Full Code Here

TOP

Related Classes of org.mt4j.util.MTColor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.