-
Notifications
You must be signed in to change notification settings - Fork 8.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Strawman: Dumb implementation of text D2D effects. #817
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,13 +3,17 @@ | |
|
||
#pragma once | ||
|
||
#include <d2d1_3.h> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this probably belongs in a precomp There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Weirdly, it is in the precomp.h for all the projects I found that should be using it, but without it the build failed, but I didn't look too much into it. Definitely a FIXME. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Correction: It is explicitly There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why does this end up included in other projects? Shouldn't it just be scoped inside There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's included in |
||
|
||
#include <wrl/implements.h> | ||
|
||
namespace Microsoft::Console::Render | ||
{ | ||
struct DrawingContext | ||
{ | ||
DrawingContext(ID2D1RenderTarget* renderTarget, | ||
ID2D1DeviceContext4* textRenderContext, | ||
ID2D1Effect* textEffect, | ||
ID2D1Brush* foregroundBrush, | ||
ID2D1Brush* backgroundBrush, | ||
IDWriteFactory* dwriteFactory, | ||
|
@@ -18,6 +22,8 @@ namespace Microsoft::Console::Render | |
const D2D1_DRAW_TEXT_OPTIONS options = D2D1_DRAW_TEXT_OPTIONS_NONE) | ||
{ | ||
this->renderTarget = renderTarget; | ||
this->textRenderContext = textRenderContext; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. you're using tabs. we use 4 spaces. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oops, missed one! |
||
this->textEffect = textEffect; | ||
this->foregroundBrush = foregroundBrush; | ||
this->backgroundBrush = backgroundBrush; | ||
this->dwriteFactory = dwriteFactory; | ||
|
@@ -27,6 +33,8 @@ namespace Microsoft::Console::Render | |
} | ||
|
||
ID2D1RenderTarget* renderTarget; | ||
ID2D1DeviceContext4* textRenderContext; | ||
ID2D1Effect* textEffect; | ||
ID2D1Brush* foregroundBrush; | ||
ID2D1Brush* backgroundBrush; | ||
IDWriteFactory* dwriteFactory; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's going on here? Why are these getting removed? (and below)
It doesn't look like you otherwise manipulated this module. Were these moved out by someone else and the filters wasn't updated?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have no idea! I guess so, as the .vcxproj wasn't changed.