Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8800475
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T00:35:52+00:00 2026-06-14T00:35:52+00:00

I am trying to get started with playn 1.3 (should I use 1.4?) but

  • 0

I am trying to get started with playn 1.3 (should I use 1.4?) but I am failing early on the point on how to simply fill some sort of layer with a radial gradient. graphics().createRadialGradient tells me that it creates a Pattern, but it just creates a Gradient that I cannot use on setFillPattern. Using createCanvasLayer has been deprecated, so I am trying around with ImageLayer and SurfaceLayer but I cannot find a way to create an actual Pattern from the Gradient or something similar that finally fills a layer with my Gradient. Of course I must just be overlooking something, so I’d be happy to have a hint here because playn really looks promising to me 🙂

Cheers

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T00:35:53+00:00Added an answer on June 14, 2026 at 12:35 am

    Tested in PlayN 1.4:

    CanvasImage canvasImage = graphics().createImage(100, 100);
    Canvas canvas = canvasImage.canvas();
    Gradient radialGradient = graphics().createRadialGradient(50, 50, 50, 
            new int[]{Color.rgb(255, 0, 0), Color.argb(0, 255, 0, 0)}, 
            new float[]{0, 1});
    canvas.setFillGradient(radialGradient);
    canvas.fillRect(0, 0, 100, 100);
    ImageLayer imageLayer = graphics().createImageLayer();
    imageLayer.setImage(canvasImage);
    imageLayer.setDepth(1);
    graphics().rootLayer().addAt(imageLayer, graphics().width() / 2, graphics().height() / 2);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to get started with FMOD but I'm having some issues compiling the
I've been trying to get started with scipy, but the package is giving me
I am trying to get started doing some Silverlight development. I am interested in
Im trying to get started with app development. Isnt this the corrent JDK if
Im trying to get started with silverlight for wp7 and I understand its Silverlight
I am trying to get started in testing ActiveAdmin, in particular I need to
I am trying to get started with iOS Airplay (split screen and mirroring) and
I am trying to get started with scons . I have Python 3.0.1 and
I'm trying to get started with Hibernate, and when executing my program I get
i'm trying to get started with silverlight 2. i have a weird bug. every

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.