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 7773931
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T17:15:04+00:00 2026-06-01T17:15:04+00:00

In D2D, is there a way to create a gradient brush which uses a

  • 0

In D2D, is there a way to create a gradient brush which uses a custom path geometry as its start/stop points? I can do the trivial way of creating a different brush for each step of the path and rendering that as a separate path with that brush, but I am looking for something that won’t kill performance.

Thanks!

  • 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-01T17:15:05+00:00Added an answer on June 1, 2026 at 5:15 pm

    What you want is an equivalent to GDI+’s PathGradient, which simply doesn’t exist in Direct2D.

    As a workaround, you may try using GDI+ to render what you need into a bitmap, and then draw that with Direct2D. This won’t be hardware accelerated, and the bitmap sharing between GDI+ and Direct2D is a little clumsy, but it would at least work. You would create an ID2D1Bitmap with ID2D1RenderTarget::CreateBitmap(), then lock the GDI+ Bitmap, then use ID2D1Bitmap::CopyFromMemory() with the values from the GDI+ BitmapData.

    If you are using a software render target, you can also use ID2D1RenderTarget::CreateSharedBitmap() which would let you skip the memoroy copying. It would require you to first wrap the GDI+ BitmapData (aka “the locked GDI+ Bitmap”) with an IWICBitmapLock implementation of your own (it’s not difficult, but certainly clumsy).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have written the program, which chooses a random element from the array. Once
Hey guys, and thanks for looking. I have built the simple D2D app from
How can I easily do the following in GWT? (The code below is illegal
I've downloaded, compiled and installed gdc from it's bitbucket repository . Then I downloaded,
Beyond perplexed this time... The simplest possible line of code works sometimes, sometimes it
Man so much has changed since I learned DirectX 7. Everywhere I look (except
I'm trying to extract boot time by getting current time SYSTEMTIME structure, then converting
I'm running into an issue with floating point exceptions turned on in Visual Studio
I believe the new C++ standard allows for an extra scope for enumerated types:
Sub Parse() Workbooks.OpenText Filename:=C:\Users\karthic.rangaraj\Desktop\4401.csv ' Parse it using comma and semicolon as delimiters Range(Range(A1),

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.