Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Drawing sprites in Java

Matt JacobsMatt Jacobs Member Posts: 2
How would I go about drawing a sprite in Java (ie. skipping all pixels of a certain colour, leaving the background in those spots intact).

You would think it would be a standard part of the Graphics class, or something similar, but if it's there I haven't found it.

Comments

  • scarfaceclawscarfaceclaw Member Posts: 4
    I dont remember them by heart but you can do that using ImageConsumer and ImageProducer class. Look in the api documentation


    : How would I go about drawing a sprite in Java (ie. skipping all pixels of a certain colour, leaving the background in those spots intact).
    :
    : You would think it would be a standard part of the Graphics class, or something similar, but if it's there I haven't found it.
    :

  • Chris BrownChris Brown USAMember Posts: 4,496 ✭✭

    _________ || http://forcoder.org || free video tutorials and ebooks about [ Scratch, Ruby, R, C++, Python, C, JavaScript, Go, Swift, PL/SQL, Objective-C, Assembly, Delphi, Java, MATLAB, Perl, C#, PHP, Visual Basic, Visual Basic .NET Prolog, Bash, SAS, LabVIEW, Lua, Dart, Lisp, Transact-SQL, Scheme, VBScript, ML, Apex, Kotlin, ABAP, Fortran, Ada, Rust, Scala, Logo, Alice, Julia, F#, Awk, Hack, COBOL, FoxPro, Erlang, Clojure, D, Crystal ]

Sign In or Register to comment.