AnsweredAssumed Answered

DMA2D / Chrom-ART questions

Question asked by mandrekar.aditya on Mar 11, 2016
Latest reply on May 10, 2016 by FTITI.Walid
Hi, I'm trying to use an STM32F4 to render images on a display using DMA2D. I'm fairly new to graphics and blending so I would appreciate some input.

Say I'm trying to display two 100x100 squares, one red at 0,0 and one blue at 50,0. Both squares are encoded in ARGB8888 form with alpha channel values of 0x7F throughout.

If I do this without any sort of blending and layering, I'll get one red rectangle that is from 0,0 to 49,0 and one blue square from 50,0 to 149,0.

My question here is... if I want the middle bit to be purple, do those two squares have to be on separate layers? This has worked for me mostly; I can put images on different layers and the alpha channel on the foreground correctly shows/blurs/hides the background as needed. But if I wanted to put two images on the same layer, blend them AND show the background... is there any way to do it using the DMA2D engine? I know I can blend two pixels in software using a slightly complex formula but I don't want to tax the processor.

I hope I've made this clear but I'll clarify any questions you have for me in return.