Coder Social home page Coder Social logo

Comments (2)

jdeere5220 avatar jdeere5220 commented on June 8, 2024

Hello @RickMenza ,

I whipped up a quick example. A couple of notes:

  1. GUIX only supports creating ALPHAMAP gradients today, which means it generates an 8bpp alphamap and you can then runtime assign the color used to draw the alphamap by initializing your brush. That's probably what you want anyway (that's what everybody wants!) but just to make sure you understand what's happening.

  2. I purposely made it so the code calls "CreateGradient" every time you push the button, even though it really doesn't need to because the same gradient is being used every time, just drawn in different brush colors. I just wanted to demonstrate that gx_utility_gradient_create always check to see if the requested gradient has already been created, and if so it returns the existing gradient alphamap instead of creating a brand new one. If you were to check on the amount of the scratchpad memory that is free, it should only decrease on the first call and then stay constant.

There is a VisualStudio 2019 project included that should allow you to build and run as a desktop app. Let me know if you have any issues.

Best Regards

guix_gradient_test.zip

from guix.

RickMenza avatar RickMenza commented on June 8, 2024

from guix.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.