Examples of Color4


Examples of com.ngt.jopenmetaverse.shared.types.Color4

    }

   
    static Color4 ReadColor(Node root)
    {
        Color4 color = new Color4();

      NodeList nodeList = root.getChildNodes();   
      for(int i = 0; i < nodeList.getLength(); i++)
      {
        Node node = nodeList.item(i);
        if(node.getNodeType() == Node.ELEMENT_NODE)
        {
          String nodeName = node.getNodeName();
          if(nodeName.equalsIgnoreCase("R"))
            color.setR(Float.parseFloat(node.getFirstChild().getNodeValue().trim()));
          else if(nodeName.equalsIgnoreCase("G"))
            color.setG(Float.parseFloat(node.getFirstChild().getNodeValue().trim()));
          else if(nodeName.equalsIgnoreCase("B"))
            color.setB(Float.parseFloat(node.getFirstChild().getNodeValue().trim()));
          else if(nodeName.equalsIgnoreCase("A"))
            color.setA(Float.parseFloat(node.getFirstChild().getNodeValue().trim()));
        }
      }
     
        return color;
    }
View Full Code Here

Examples of com.ngt.jopenmetaverse.shared.types.Color4

        prim.Scale = block.Scale;
        prim.ClickAction = ClickAction.get(block.ClickAction);
        prim.OwnerID = block.OwnerID;
        prim.MediaURL = Utils.bytesWithTrailingNullByteToString(block.MediaURL);
        prim.Text = Utils.bytesWithTrailingNullByteToString(block.Text);
        prim.TextColor = new Color4(block.TextColor, 0, false, true);
        prim.IsAttachment = attachment;

        // Sound information
        prim.Sound = block.Sound;
        prim.SoundFlags = block.Flags;
View Full Code Here

Examples of com.ngt.jopenmetaverse.shared.types.Color4

          // Floating text
          prim.Text = text;

          // Text color
          prim.TextColor = new Color4(block.Data, i, false);
          i += 4;
        }
        else
        {
          prim.Text = "";
View Full Code Here

Examples of com.ngt.jopenmetaverse.shared.types.Color4

                    PartMaxAge = pack.UnpackFixed(false, 8, 8);
                    byte r = pack.UnpackByte();
                    byte g = pack.UnpackByte();
                    byte b = pack.UnpackByte();
                    byte a = pack.UnpackByte();
                    PartStartColor = new Color4(r, g, b, a);
                    r = pack.UnpackByte();
                    g = pack.UnpackByte();
                    b = pack.UnpackByte();
                    a = pack.UnpackByte();
                    PartEndColor = new Color4(r, g, b, a);
                    PartStartScaleX = pack.UnpackFixed(false, 3, 5);
                    PartStartScaleY = pack.UnpackFixed(false, 3, 5);
                    PartEndScaleX = pack.UnpackFixed(false, 3, 5);
                    PartEndScaleY = pack.UnpackFixed(false, 3, 5);
                }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.