News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

DrawStr rotation in Pixelmap

Started by HSE, November 21, 2019, 08:07:04 AM

Previous topic - Next topic

HSE

Hi Biterider!!

There is a minor problem with string bitmap rotation: extremes are cutted.

Apparently can be solved extending string bitmap: ;Obtain the dimensions of the printed text, in the context of the temp device
  m2z TextRect.left
  m2z TextRect.top
  m2z TextRect.right
  m2z TextRect.bottom
  mov ebx, dRenderFlags
  or ebx, DT_CALCRECT
  invoke DrawTextEx, hTempDC, pText, -1, addr TextRect, ebx, NULL

mov eax, TextRect.bottom        <<<<   magic here
add TextRect.right, eax         <<<<


The solution is easier than understand rotation fundamentals  :biggrin:, but perhaps is incorrect.
Equations in Assembly: SmplMath

Biterider

Hi HSE
Thanks for your feedback. I'll check the logic to see if I find a bug.
Biterider

Biterider

Hi HSE
I have revised the code and I think I have found the culprit. It was that line:

invoke DrawTextEx&StrType&, hTempDC, pText, -1, addr TextRect, ebx, NULL

where &StrType& was missing and called the wrong API.

I resurrected an old demo that I used to check the result.
I hope it works for you now.  :biggrin:


I completed LoadFileA/LoadFileW and SaveFileA/SaveFileW in the posted file.

Biterider


HSE

Hi Biterider!

No AVX here  :biggrin:

Thanks anyway  :thumbsup:

HSE
Equations in Assembly: SmplMath

Biterider

#4
Hi HSE
I'm sorry  :sad:
It has to be the new s2s macro when instancing a new object. I restricted the macro to only use the GP registers and recompiled it.
I hope it works now.

Biterider

HSE

 :biggrin: :biggrin:  :thumbsup:

Quote from: Biterider on April 07, 2020, 06:06:39 AM
It has to be the new s2s macro when instancing a new object.
Could be in your building. I was thinking that the new (unreleased ?) CloneRect use s2s.



Equations in Assembly: SmplMath

Biterider

Hello HSE
You are probably right. I only changed the available registers in the New macro. There are probably other occurrences.
I tried again and deactivated the MM register list in the s2s macro. This change should work everywhere.

New upload in the post above.

Biterider

HSE

Hi Biterider!!

Build 3 work perfect here, also build 4.

  I can not build the application, because there is a sintaxis problem when CloneRect expand mrm. I'm sure pretty easy to fix, a little of entertainment for this days :biggrin:.

  But I think you are not using in this demo WinHelper.inc or System.inc Version C.1.0, October 2017.

Regards. HSE
Equations in Assembly: SmplMath

tempuyax


Hi
I really like this objasm32. and I tried it with HXDOS which I booted with DOS Window ME. Demo01c runs smoothly ...


regards,

Tempuyax
Indonesia, North Borneo

Biterider

Hi tempuyax
I am glad to hear that you like it.  :biggrin:
Consider switching to the latest ObjAsm model for dual bitness (64/32 bit) compilation.
The older ObjAsm32 is no longer actively developed because it is included in the former.

Biterider

tempuyax

Hehehe

at first I did not understand it, after all this time I used it. I am very happy. what I've been looking for is here. Thank you my bro.

I still love the old model, to research open the x86 engine screen deeper. because of that I have to go down to the level of the chipset machine. not for making applications.

regards,

tempuyax