Examples of Brush


Examples of com.lixia.rdp.orders.Brush

     * Perform a pattern blit on the screen
     *
     * @param patblt PatBltOrder describing the blit to be performed
     */
    public void drawPatBltOrder(PatBltOrder patblt) {
        Brush brush = patblt.getBrush();
        int x = patblt.getX();
        int y = patblt.getY();

        if (x > this.right || y > this.bottom) {
            return; // off screen
View Full Code Here

Examples of com.lixia.rdp.orders.Brush

        int cy = triblt.getCY();
        int srcx = triblt.getSrcX();
        int srcy = triblt.getSrcY();
        int fgcolor = triblt.getForegroundColor();
        int bgcolor = triblt.getBackgroundColor();
        Brush brush = triblt.getBrush();

        // convert to 24-bit colour
        fgcolor = Bitmap.convertTo24(fgcolor);
        bgcolor = Bitmap.convertTo24(bgcolor);
View Full Code Here

Examples of de.sebastianbenz.task.ui.highlighting.Brush

      }
    }
  }

  public Brush get(String key) {
    Brush configuration = configurations.get(key);
    if(configuration == null){
      configuration = configurations.get(DEFAULT_CONFIGURATION);
    }
    return configuration;
  }
View Full Code Here

Examples of de.yaams.extensions.basemap.tiled.mapeditor.brush.Brush

        int x = e.getX() / maxWidth;
        int y = e.getY() / maxWidth;
        int selectedIndex = y * perLine + (x > perLine - 1 ? perLine - 1 : x);

        if (selectedIndex >= 0 && selectedIndex < brushes.size()) {
          Brush previousBrush = selectedBrush;
          selectedBrush = brushes.get(selectedIndex);
          firePropertyChange("selectedbrush", previousBrush, selectedBrush);
          repaint();
        }
      }
View Full Code Here

Examples of de.yaams.extensions.basemap.tiled.mapeditor.brush.Brush

    // Draw the brushes
    Iterator<Brush> itr = brushes.iterator();
    int x = 0;
    while (itr.hasNext()) {
      Brush brush = itr.next();
      Rectangle bb = brush.getBounds();
      float o = maxWidth / 2.0f - bb.width / 2.0f;
      g.translate((int) o, (int) o);
      brush.drawPreview((Graphics2D) g, new Dimension(maxWidth, maxWidth), null);
      g.translate((int) -o, (int) -o);

      if (brush == selectedBrush) {
        g.drawRect(0, 0, maxWidth, maxWidth);
      }
View Full Code Here

Examples of de.yaams.extensions.basemap.tiled.mapeditor.brush.Brush

  }

  @Override
  public void propertyChange(PropertyChangeEvent evt) {
    if (evt.getPropertyName().equals("selectedbrush")) {
      Brush b = brushes.getSelectedBrush();
      if (b != null) {
        brushSize.setValue(b.getBounds().width);
      }
    }

    bApply.setEnabled(true);
  }
View Full Code Here

Examples of gov.nasa.arc.mct.graphics.brush.Brush

   
    brushes.add(new Fill((Color) getSetting(GRAPHICAL_BACKGROUND_COLOR)));
    FillProvider provider = fillMap.get((String) getSetting(GRAPHICAL_FOREGROUND_FILL));
    Object evaluator = getSetting(GRAPHICAL_EVALUATOR);
    if (evaluator == NO_EVALUATOR) {
      Brush b = provider.getFill((Color) getSetting(GRAPHICAL_FOREGROUND_COLOR));
      Double minimum = Double.parseDouble((String) getSetting(GRAPHICAL_FOREGROUND_MIN));
      Double maximum = Double.parseDouble((String) getSetting(GRAPHICAL_FOREGROUND_MAX));
      if (b instanceof StateSensitive) ((StateSensitive) b).setInterval(minimum, maximum);
      brushes.add(b);
    } else {
      // Build evaluator brushes
      Object evMapSetting = getSetting(GRAPHICAL_EVALUATOR_MAP);
      if (evMapSetting instanceof Map) {
        Map evMap = (Map) evMapSetting;
        for (Object entry : evMap.entrySet()) {
          if (entry instanceof Map.Entry) {
            Object key = ((Map.Entry) entry).getKey();
            Object value = ((Map.Entry) entry).getValue();
            if (value instanceof Color && key instanceof String) {
              Fill b = provider.getFill((Color) value);
              Double minimum = Double.parseDouble((String) getSetting(GRAPHICAL_FOREGROUND_MIN));
              Double maximum = Double.parseDouble((String) getSetting(GRAPHICAL_FOREGROUND_MAX));
              b.setInterval(minimum, maximum);
              brushes.add(new ConditionalBrush(b, (String) key));
            }
          }
        }
      }
View Full Code Here

Examples of tiled.mapeditor.brush.Brush

                int y = e.getY() / maxWidth;
                int selectedIndex =
                    y * perLine + (x > perLine - 1 ? perLine - 1 : x);

                if (selectedIndex >= 0 && selectedIndex < brushes.size()) {
                    Brush previousBrush = selectedBrush;
                    selectedBrush = (Brush) brushes.get(selectedIndex);
                    firePropertyChange("selectedbrush", previousBrush, selectedBrush);
                    repaint();
                }
            }
View Full Code Here

Examples of tiled.mapeditor.brush.Brush

        // Draw the brushes
        Iterator itr = brushes.iterator();
        int x = 0;
        while (itr.hasNext()) {
            Brush brush = (Brush) itr.next();
            Rectangle bb = brush.getBounds();
            float o = maxWidth / 2.0f - bb.width / 2.0f;
            g.translate((int) o, (int) o);
            brush.drawPreview((Graphics2D) g, new Dimension(maxWidth, maxWidth), null);
            g.translate((int) -o, (int) -o);

            if (brush == selectedBrush) {
                g.drawRect(0, 0, maxWidth, maxWidth);
            }
View Full Code Here

Examples of tiled.mapeditor.brush.Brush

    }

    public void setSelectedBrush(Brush brush) {
        Iterator itr = brushes.iterator();
        while (itr.hasNext()) {
            Brush br = (Brush) itr.next();
            if (br.equals(brush)) {
                selectedBrush = br;
                break;
            }
        }
    }
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.