Paint or Fill a pixel with color

Greetings I am a very beginner with java 2D, I am going to design an applet simulator about artificial life. To start I want to know how to paint a pixel with any color. example
Graphics g
g.fillPixel(Point x, Point y, Color.ANY)Thanks by your help.
Cordially
Andrei
Message was edited by:
andreihortua

The most efficient way to paint a pixel in Java2D is fillRect(x, y, 1, 1);
Both drawLine and drawRect typically have higher overhead.
Dmitri

Similar Messages

  • How to fill a symbol with color

    How to fill a symbol with color?

    Good day!
    What do you mean by »symbol« in this case?
    Is this on a Layer of its own or is it part of a photograph?
    Could you please post a screenshot with the Layers Panel visible?
    Regards,
    Pfaffenbichler

  • Filling an outline with color

    I'm using Illustrator CC.  When I draw an outline with either the pencil tool or the paintbrush tool, I can't fill it in with color, even though the path appears to be closed.  The "fill" square has a red diagonal line through it and won't switch to a color.  Any help would be appreciated.
    Thanks,  Ann

    Red slash is nothing to worry about, that just means measn fill of none.
    Make sure you have the path selected, and then try using the appearance palette instead to fill. You can either click on the arrow and do a dropdown as in the screenshot. Or as you can see the fill is highlighted (light blue running in back of the word Fill) and then click on a swatch in swatches.
    You can also double lcikc on the pencil tool, adn enable fille new pencil strokes.
    which will then use your fill and stroke colors.

  • Fill outline fonts with color and keep it vector

    Is there a way to fill the inside of a type that is an outline without rasterizing the font and using the paint bucket?
    The reason I need to keep it vector is because the finished graphic will be sized from 50 to 300 dpi and the edges will soften when scaled. Below is an example of the font style with two treatments. For the red fill I rasterized  the font, then used paint bucket. The other with the green behind is to show the inside transparency of the font.

    I guess the op meant upping the resolution of the document? The poster didn't say why they can't start with a document 300
    and maybe it would be better to fill the areas after upping the resolution.
    Anyway, this is a 680x480 document at 72 resolution and i did use the magic wand for the intial selection, then used quick mask to fix a few spots, contracted the selected 1px
    and then made the work path using a tolerance of 0.5. (400% view)
    path
    after color fill layer below the text layer
    upscaled to a resolution of 300 (100% view)
    after fixing the path in areas highlighted above (and a few others)
    MTSTUNER

  • Photoshop CS6 - How can javaScript fill blank layer with color?

    Hello,
    I'm a production artist and I work with PSD files that were created in Adobe Scene7 Image Authoring Tool. These PSDs contain a background layer along with 1-20 alpha channels. My script has to make new blank layers based on the number of alpha channels and then it has to fill the new layers with light gray. The RGB values are 161, 161, 161. I checked the PSCS6 JavaScript Reference pdf, but I don't see a method that would do this for artLayers. (Let me also say that I'm new to javaScript).
    Does anyone know how to fill a blank layer with these RGB values?
    Here's my script so far:
    #target photoshop 
    // declare variable to contain the active document
    var myDoc=app.activeDocument;
    // declare variable to contain the number of alpha channels, excluding the RGB channels
    var alphaChan = myDoc.channels.length - 3;
    // create loop to make new layers based on number of alpha channels and fill each layer with gray
    for (a=0; a<alphaChan; a=+1){
    myDoc.artLayers.add();
    if (myDoc.artLayers.length == (alphaChan + 1)) {
        break;

    var color = new SolidColor();
    color.rgb.red = 161;
    color.rgb.green = 161;
    color.rgb.blue= 161;
    myDoc.selection.fill(color);

  • Filling different paths with color

    Hi, i am stuck with filling my path, i don t know hot to merge, or unite specific parts of different paths, I hope the picture explain it better, i want to fill the area marked orange with solid color. I am using Illustrator CS6.
    Cheers, de Filippo

    Take a look at Live Paint and Shape Builder tool.

  • Fill table cells with color % depending on cell content

    Hi.
    I'm working on a document with a lot of tables filled with percentages. The tables are originally on a Word document and the table cells are tinted according to their content: a value of 20% on the cell corresponds to a tint of 20%. This is done automatically on the Word document through a conditional formatting option that applies a graded color scale. Is there any way to do this in InDesign? I tried placing the tables and tried all options, but the color is not imported. Perhaps a script or a GREP style?
    Thank you.

    Conditional formatting in Word is done via formula, but in Excel it is handled more "on the surface" and Excel's conditional formatting carries into InDesign nicely via Place or Paste. It could be worth considering moving those tables into Excel.
    InDesign doesn't do this kind of formatting as a native function, but it couldn't hurt to ask about possible scripted solutions in the Scripting Forum.

  • Fill multiple layers with color (CS3)?

    Using Photoshop CS3
    I created a button set for a web forum. Each button is in its own group. Each group contains a text layer and a base layer. And each button appears to be next to each other, even though they are on different layers in different groups. This allows Photoshop to slice things up as different buttons when I save to web or devices.
    Here’s my quandry. The buttons are 1 solid color with 2 borders. I want to replace the button color on all buttons, but leave the borders alone. Using Magic Wand set to Sample all Layers I can get a marquee that appears to select all the areas on all the layers. But when I use the bucket tool to replace that color on all layers, it won’t do it. It puts all the color on the top layer – even though I have the bucket tool set to All Layers.
    Is there a way to fill all the layers in the way I want.
    By the way, I thought of using a color overlay on each button, and then I could simply copy the style to all the base layers. But see no way to also have two independent strokes for the two outline colors. On the other hand, if you know of some better way to do any of this, please let me know.

    I'm sorry. I intended to mention that Fill doesn't work either, but it looks like I left that out. Using the Fill command places all the color on the top layer only. I also tried using Select Similar along with Bucket or Fill to select the base layers, but that didn't help.

  • I cant fill my layers with color

    Ive selected my later, selected my area to color.. have marching ants, and the area wont fill with paintbucket or pattern. HELP!

    You should have no problem doing that. You must be doing something other the what you write. A screen capture of you problem may help Identify what wrong.

  • Filling Font Spaces with Color

    Hi
    I would like to fill the spaces in my font with a solid color eg. 'O' would have the enclosed circular area filled.
    I am thinking that ColorTransform or Blendshader might be the way to go. Has anyone has done something like this before?
    Thanks

    I am displaying the text in a 'Label' object.

  • How do I fill a paragraph with color in Pages 5?

    I recall a feature in previous versions of Pages which allowed a color (or texture) fill of a paragraph.  Is this feature missing from the new Pages 5.2?
    I do find the fill feature for a Text Box, and the color options for text, but not  paragraphs.  At least it's not obvious in the Inspector, is it hiding somewhere on a sub menu?
    Thanks for your help.
    George

    A useful artifact in Pages ’09, but not in Pages v5.2. Select your paragraph text. Use the Character Fill Color option from the included screen grab.
    If you want to place a color behind the entire paragraph block, and not just the text:
    Format > Text > Layout > Background Color gives the following:

  • Fill layer with color

    pse13  I am trying to fill layer.  The layer has a small rectangle on it and nothing else.  When I fill layer, it fills the entire canvas, not just the rectangle!  This used to work!

    Go to File>new>blank file. Enter w, h, and resolution, & background color. This will be the canvas.
    Set up the Rectangular marquee tool to fixed size, enter w & h dimensions for the rectangle
    Use the Paint-bucket tool to fill the rectangle with color of choice as determined by the foreground color chip.

  • Keyboard shortcut for filling layer with color are opposite on my PS CS6 OSX install, Help?

    Hello all,
    I'm a bit of a noob, and following a tutorial….and found something strange and wonder if you might help me figure what's happening.
    I have Photoshop Extended CS6 on a macbook pro (late 2011).
    I'm running OSX v 10.7.5
    I'm following along and the instructor added a new layer. I did this.
    He then filled the layer with white which is his background color (he has black foreground, white background). I have the same fore/background colors.
    Now, I thought on mac that to fill with foreground color you hit Apple+Delete  and to fill with background you hit Option+Delete
    It is doing the exact OPPOSITE for me. I hit Apple+Delete (or even backspace)  and it fills with my background color which is white
    If I hit Option+Delete (or backspace) it fills with my foreground color.
    I've tried looking in the Edit Keyboard shortcuts area…but I don't see these settings anywhere.
    I do have an external keyboard  hooked to my mac. It is a 3rd party one, but seems to work in ever other way normally.
    Keyboard here is:  http://pckeyboard.com/page/UKBD/UB40P4A
    Any suggestions why my keyboard shortcut for filling a layer with color might be reversed?
    Thanks in advance,
    CC

    eartho wrote:
    option-delete is, and always has been, fill with foreground.
    a 1 second google search would have informed you of this.
    Thanks for the reply.
    I did do a Google and I got this:
    http://blog.coghillcartooning.com/84/tip-keyboard-shortcut-to-fill-a-photoshop-layer-or-se lection-with-the-background-or-foreground-color/
    And from that I got the option-delete was background, and apple-delete was foreground.
    Hence my confusion...
    Thanks for the reply, I guess I should check 2-3 sites each time I google for keyboard shortcuts for PS.
    CC

  • Rectangles with colors

    <mx:Canvas id="b1" x="10" y="10" height="40" width="300" borderStyle="solid" borderColor="black"/>
    to add rectangles side by side inside this canvas i wrote the following code
    for(var i:int=b1.x;i<b1.x+b1.width;i=i+15)
                        var line1:UIComponent = new UIComponent();
                        var lineThickness1:Number = 1;
                        var lineColor1:Number = 0x000000;
                        var lineAlpha1:Number = 1;
                        line1.graphics.lineStyle(lineThickness1,lineColor1,lineAlpha1);
                        line1.graphics.moveTo(i,b1.y);
                        line1.graphics.drawRect(i,b1.y,15,b1.height);
                        this.addChild(line1);
    now I want to fill those rectangles with colored rectangles starting to ending
    i pass the units then units*15 will be calculated and the covered rectangles will be populated with colored rectangles for that i wrote the following code
                             var c:UIComponent = new UIComponent();
                            var xposstr:String = arr1.getItemAt(arr1.length).toString();
                            var xpos:int = parseInt(xposstr);
                           c.graphics.beginFill(0xFFCC00,1);
                            c.graphics.drawRect(xpos,0,numUnits*15,b1.height-2);
                            c.graphics.endFill();
                            b1.addChild(c);
                            arr1.addItem(c.x+numUnits*15);
    arr1 is the ArrayCollection
    but iam not getting the required output

    This code draws rectangle (random background color),
    var colors: Array = [0x0000FF, 0x00FF00, 0xFF0000, 0xFF00FF]
    for(var i: int = 0; i < b1.width; i = i + 15) {
         var lineThickness1:Number = 1;
         var lineColor1:Number = 0x000000;
         var lineAlpha1:Number = 1;
         var bgColor: uint = colors[Math.floor(Math.random() * colors.length)];
         var g: Graphics = b1.graphics;
         g.lineStyle(lineThickness1,lineColor1,lineAlpha1);
         g.beginFill(bgColor, 1.0);
         g.moveTo(i, 0);
         g.drawRect(i, 0, 15, b1.height - 1);
         g.endFill();

  • Brushes have pixelated edge: when filled with color there's a white line at the border

    Hello,
    I'm trying to make geometric shapes that are black outlines filled with color. I'm drawing the shapes with the pen tool. When I fill them using the bucket tool, there's a pixellated white line separating the black outline and the color infill. How to do make the color fill directly to the black outline?
    Thanks for your help,
    DJ
    CS4
    OS 10.5.8

    In addition to Chris's post wanted to advise you that stroke effects in Phothsop have rounded edges in Phothoshop. You will notice this on thin strokes (eg: 1 pxl).
    Set the stroke to go on inside for squared edges, not center or outside. Adobe has been aware of this since CS, but has not been find a solution for Photoshop to handle this.

Maybe you are looking for

  • HTTP protocol in Sender side

    Dear SDN Experts,                         May i know can we use HTTP adapter in Sender Side  of integration.

  • When I use Firefox on Gmail, it changes my settings to include a blank signature.

    Firefox (I assume) keeps changing my Gmail signature to be turned on and attaching a blank signature. Even if I try to save it "off," it reverts back. I don't have this problem on IE. I had been using Gmail Redesigned Plugin but disabled it and I'm s

  • Re pdf files in Firefox

    thank you Dansyacht for a solution that worked!

  • Reformat COPA and ECPCA reports

    I have been assigned to reformat existing COPA report ( Tcode ke30 and ECPCA ( tcode ke80 ) report. Both the reports are drill down reports and were done using report painter. Since i have had very less experience with drill down reporting i would ap

  • Want to configure Oracle EDI Gateway for Inbound Invoice Interface

    Hello, Newbie to Oracle Apps and want to configure Oracle EDI Gateway for Inbound Invoice Interface. We are having Oracle EBS R12 installed on OEL 5.6 Do i need to install EDI Gateway or it comes with APPS R12 installation ? if i have to install it e