Direct2D is a hardware-accelerated, immediate-mode, 2-D graphics API that provides high performance and high-quality rendering for 2-D geometry, bitmaps, and text. The Direct2D API is designed to interoperate well with GDI, GDI+, and Direct3D.
Questions tagged [direct2d]
738 questions
-1
votes
1 answer
What does negative top and left mean in D2D1_RECT_F returned from GetImageLocalBounds?
I'm struggling getting the size of the result of gaussian blur ID2D1Effect (CLSID_D2D1GaussianBlur).
I want to draw a shadow box behind a rectangle where the shadow will be positioned such that the rectangle is in the center of the shadow.
I start…

dev65
- 1,440
- 10
- 25
-1
votes
1 answer
How to avoid CreateBitmapFromWicBitmap returning 0x8007000E
I have a MFC application where I use Direct2D to draw some images loaded from disk.
When the application is started I create a IWICBitmapSource with this methode.
IWICBitmapSource *Main::piGetIWICBitmap()
{
IWICBitmapDecoder *pDecoder =…

Kennet
- 323
- 4
- 12
-1
votes
1 answer
How to copy an image from SharpDX/Direct2D to .NET Bitmap
I develop a .NET WinForms application and need to scale a lot of big images and display them as small icons on the form. I have problem with performance especially on specific machines. Thus my goal now is to use SharpDX to scale these image using…

Drreamer
- 332
- 1
- 10
-1
votes
1 answer
E_INVALIDARG from (WIC) CoCreateInstance
In trying to create an IWIC Factory, the CoCreateInstance function is returning E_INVALIDARG (One or more arguments are invalid). I checked MSDN and I cannot see which of these arguments could be invalid.
IWICImagingFactory* iwicfactory =…

kazama
- 19
- 4
-1
votes
1 answer
Direct2D Errors- d2d1_1.h is filled with errors
I was working with Direct2D for a few months, then got started on Direct3D for about 3 weeks. I need to start a program I was using before, but now the d2d1_1.h file won't compile. It is FILLED with errors- 1019 errors to be exact, and I don't know…

Evan K
- 1
- 2
-1
votes
1 answer
Windows - Direct2d or Direct3d for isometric games (2.5D games)
I wanted to try and recreate a a small game that is no longer in development and I wanted to make sure I am learning the correct DirectX api. The game used sprites for all their animations if that helps.
Would I learn direct2d or direct3d for a game…

Trevin Corkery
- 651
- 7
- 19
-1
votes
2 answers
following "What's a Creel?"s tutorial: Can't create a IWICBitmapDecoder, in visual studio 2015
I've been following "what's a Creel?"'s tutorial for direct 2d. I got to tutorial 8: 'Loading an image'. I didn't have the spritesheet object save the pointer to the Graphics object as this caused problems with this version of visual studio, so it's…

mrsamsir
- 31
- 5
-1
votes
1 answer
What is the reason for: error C2512: 'D2D1::ColorF' : no appropriate default constructor available
I am upgrading my GDI+ project to Direct2D.
When I rewrote my GDI+ class to Direct2D I got following error message during compilation:
error C2512: 'D2D1::ColorF' : no appropriate default constructor available
The header file:
#pragma once
#include…

Märs
- 37
- 5
-1
votes
1 answer
How to display scaled image without anti-aliasing?
Question
How can I scale an image in XAML quickly without anti-aliasing applied?
Background
I am trying to make a pixel editor as a Windows 8 XAML/C# app. I'm using c#/XAML because most of my experience is with c#/WPF.
Method 1: WriteableBitmap +…

Amanduh
- 1,233
- 1
- 13
- 23
-1
votes
1 answer
Direct2D and custom shaped window
Does Direct2D support custom shaped windows? Say, drawing a circle over all other windows. If yes, could anyone give a link to an article or sample of such technique? Thanks.

noober
- 4,819
- 12
- 49
- 85
-1
votes
1 answer
RGB values for colors in direct2d
I am learning win32 api from MSDN. I came across this topic(http://msdn.microsoft.com/en-us/library/windows/desktop/ff684180(v=vs.85).aspx) which talked about the colors in direct2d. But there are only 8 main colors for which RGB code is given. What…

Apoorv
- 373
- 1
- 5
- 15
-1
votes
1 answer
Why wont this code, almost identical to one from MSDN, won't work?
I have left some //Comments to help you navigate through the issue
I have Main.cpp
int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR lpCmdLine, int nShowCmd)
{
Game game;
game.Initialize(hInst);
game.MainMenu();
…

Mickael Bergeron Néron
- 1,472
- 1
- 18
- 31
-2
votes
1 answer
How to take text input in win2d just like we do in uwp with TextBox?
How to take text input in win2d like we do in uwp with TextBox?

pavan kumar
- 125
- 3
- 10
-2
votes
1 answer
Creating D2D1 Factory and Hwnd Render Target
I successfully created an empty window that would open and sit there until I closed it. Next, I wanted to try using Direct 2-D to draw something simple to that window. I created a class that would initialize Direct 2-D and then draw to the window,…

kazama
- 19
- 4
-2
votes
1 answer
How to read a png image and transfer to ID2D1Bitmap?
I have a C++ project which uses Windows Animation Manager with Direct2D under Visual Studio 2010 to implement image sparkled animation.
But when I load a png image, the transparent can’t display correctly.
I use IWICImagingFactory and IWICBitmap to…

Freya
- 51
- 5