flat assembler
Message board for the users of flat assembler.
![]() Goto page Previous 1, 2 |
Author |
|
Overclick 25 Aug 2022, 13:36
I'm sure it is Tomasz's mistake. He made it for compatibility or some lazy reason. Or maybe I don't understand something that I want to understand, that why i'm here actually.
If you're not interested in reading my garbage, no one is forcing you to do that. |
|||
![]() |
|
Overclick 28 Aug 2022, 10:29
Can I stretch my text to rectangle anyhow or do I need to use font size only?
|
|||
![]() |
|
macomics 28 Aug 2022, 11:29
You can also draw the desired text on the bitmap and then use the bitmap as a texture to fill the rectangle.
|
|||
![]() |
|
Overclick 28 Aug 2022, 11:55
Quote:
I know that, also I can insert prerendered textures to project with text. But I want to study pure DirectWrite. Maybe I can do something by layers? |
|||
![]() |
|
Overclick 28 Aug 2022, 17:47
One more issue:
Code: ;this one seems ok,opacity works by txtBrushProperties but transform does nothing cominvk pGuiD2D1Target,CreateSolidColorBrush,txtColor,\ txtBrushProperties,pID2D1SolidColorBrush cominvk pID2D1SolidColorBrush,QueryInterface,IID_ID2D1Brush,\ pID2D1Brush cominvk pID2D1Brush,SetOpacity,float dword 0.1f ;Nothing, SetTransform too |
|||
![]() |
|
Overclick 29 Aug 2022, 11:24
My ID2D1Brush is not initialised correctly, any advice?
|
|||
![]() |
|
Roman 29 Aug 2022, 17:50
Why need this ?
cominvk pID2D1SolidColorBrush,QueryInterface,IID_ID2D1Brush,\ pID2D1Brush Code: ;only for 64 bits mov eax,1.0 movd xmm0,eax ;i not remember xmm0 or xmm1 movd xmm1,eax cominvk pID2D1Brush,SetOpacity ; and set color brush BrushClr dd 1.0,0,0,0.5 ;last alpha cominvk pID2D1Brush,SetColor,BrushClr |
|||
![]() |
|
Overclick 29 Aug 2022, 19:32
Quote:
I know this is wrong but I need to initialise ID2D1Brush somehow. They provide different bunch of methods. Code: interface ID2D1SolidColorBrush,\ QueryInterface,\ AddRef,\ Release,\ SetColor,\ GetColor interface ID2D1Brush,\ QueryInterface,\ AddRef,\ Release,\ SetOpacity,\ SetTransform,\ GetOpacity,\ GetTransform Actually I need ID2D1Brush only to try its SetTransform. Opacity works by previous one as I posted before. I'm going to drop all of it to layer's settings as it is easiest solution. But current case still open, I want to understand why it reject to be done by own provided methods. |
|||
![]() |
|
Overclick 30 Aug 2022, 02:01
Layers don't localise Transform settings
The only way Transform works for me is: Code: ..data DefaultTransform D2D1_MATRIX_3X2_F 1f,0,0,1f,0,0 cominvk pD2D1Target,SetTransform,txtBrushProperties.transform ;required transformation cominvk pD2D1Target,DrawText,txtBass,dword 3,[pIDWriteTextFormat],\ txtBassLayout,[pID2D1SolidColorBrush],2,0 cominvk pD2D1Target,SetTransform,DefaultTransform ;back to normal |
|||
![]() |
|
Overclick 31 Aug 2022, 02:28
Good news, I fixed it. No need to initialise ID2D1Brush because it is included. All methods works well.
Code: interface ID2D1SolidColorBrush,\ QueryInterface,\ AddRef,\ Release,\ GetFactory,\ ;from ID2D1Resource SetOpacity,\ ;from ID2D1Brush SetTransform,\ GetOpacity,\ GetTransform,\ SetColor,\ ;from ID2D1SolidColorBrush GetColor SetTransform and GetTransform are ignored for ID2D1SolidColorBrush because they are provided for other brush types as I understand. |
|||
![]() |
|
Goto page Previous 1, 2 < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2023, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.