Jump to content

ahmet

Active Members
  • Posts

    306
  • Joined

  • Last visited

  • Days Won

    1

ahmet last won the day on May 6 2012

ahmet had the most liked content!

About ahmet

  • Birthday 08/18/1992

Profile Information

  • Location
    Bosnia and Herzegovina

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

ahmet's Achievements

  1. I did not spot any issues with the Dialog_Box_Resources.au3. There is high CPU usage with the generated files becuse of While loop without Sleep. Once you put sleep in the generated file CPU usage drops.
  2. Dialog Box Resources can create file with the dialog resource. That way you can have an exe with only the resource. What is your goal?
  3. I suppose that you need to save font.dlg to the resource of the exe file. There is ResHacker project that might assit you into adding that template into exe file.
  4. I think FunSkin is the topic.
  5. There is example by funkey for changing MsgBox and FileOpenDialog border color if I am not mistaken. Somebody updated those to work with some newer OS.
  6. What about painting the rectangular region in white opaque color and the drawing that same region with the background color? If you paint with the white brush and then paint with original transparent brush you will get the original color.
  7. What about this $hPen1=_GDIPlus_PenCreate(0XFF00AA00) $hPen2=_GDIPlus_PenCreate(0XFF0000FF) $hBitmap=_GDIPlus_BitmapCreateFromScan0(48,48,$GDIP_PXF32ARGB) $hImageGfx=_GDIPlus_ImageGetGraphicsContext($hBitmap) ;draw some random shapes _GDIPlus_GraphicsDrawRect($hImageGfx,10,5,15,8,$hPen1) _GDIPlus_GraphicsDrawEllipse($hImageGfx,5,20,20,25,$hPen2) Local $hIcon = _GDIPlus_HICONCreateFromBitmap($hBitmap) _GDIPlus_PenDispose($hPen1) _GDIPlus_PenDispose($hPen2) _GDIPlus_GraphicsDispose($hImageGfx) $hHBITMAP=_WinAPI_Create32BitHBITMAP($hIcon,True) ; Create normal image list Local $hNormal = _GUIImageList_Create($iW, $iW,5) ;_GUIImageList_Add($hNormal, _WinAPI_CreateSolidBitmap($hGUI, 0xFF0000, $iW, $iW)) ;_GUIImageList_Add($hNormal, $hHBMPBack) $iAdd1=_GUIImageList_Add($hNormal, $hHBITMAP) _GUIImageList_Add($hNormal, $hHBMPForward) _GUIImageList_Add($hNormal, $hHBMPUp) You can load image from file with _GDIPlus_BitmapCreateFromFile.
  8. Can you share few of those those scripts that use _WinAPI_TransparentBlt() and are working fine?
  9. Try saving ini file with UTF 8, but I am almost certain that it will not work. I can bot test that. If that fails there are is some ini file udf which should resolve that issue.
  10. I think example _GDIPlus_HICONCreateFromBitmap has a nice, working example.
  11. Take look at _GDIPlus_FontCreate. Drawing with GDIPlus allows you to draw transparent text on any background. Or do you need other functions than drawing text? For transparent images GDIPlus is better choice. I am not sure whether you can draw transparent images using GDI32.
  12. Can you draw entire rouned rectangle at once? Func _GDIPlus_PathAddRoundedRect($hPath, $nX, $nY, $nWidth, $nHeight, $nRadius) ;when adding arc $nX and $nY are coordinates of the entire circle, not only the coordinates of the arc segment Local $fP2X=$nX+$nRadius, $fP2y=$nY Local $fP3X=$nX+$nWidth-$nRadius, $fP3Y=$nY Local $fP4X=$nX+$nWidth-2*$nRadius, $fP4Y=$fP2y Local $fP5X=$nX+$nWidth, $fP5Y=$ny+$nRadius Local $fP6X=$fP5X, $fP5Y=$nY+$nHeight-$nRadius Local $fP7X=$fP4X, $fP7Y=$nY+$nHeight-2*$nRadius Local $fP8X=$fP7X+$nRadius, $fP8Y=$nY+$nHeight Local $fP9Y=$fP8Y-2*$nRadius _GDIPlus_PathStartFigure($hPath) _GDIPlus_PathAddArc($hPath,$nX,$nY,2*$nRadius,2*$nRadius,180,90) _GDIPlus_PathAddLine($hPath,$fP2X,$fP2Y,$fP3X,$fP3Y) _GDIPlus_PathAddArc($hPath,$fP4X,$fP4Y,2*$nRadius,2*$nRadius,270,90) _GDIPlus_PathAddLine($hPath,$fP5X,$fP5Y,$fP6X,$fP5Y) _GDIPlus_PathAddArc($hPath,$fP7X,$fP7Y,2*$nRadius,2*$nRadius,0,90) _GDIPlus_PathAddLine($hPath,$fP8X,$fP8Y, $fP2X, $fP8Y) _GDIPlus_PathAddArc($hPath,$nX,$fP9Y,2*$nRadius,2*$nRadius,90,90) _GDIPlus_PathCloseFigure($hPath) EndFunc
  13. I think this should work for measuring string: $aInfo = _GDIPlus_GraphicsMeasureString($hGraphic, $sString, $hFont, $tLayout, $hFormat) $tRectMin=$aInfo[0] MsgBox(0,"Min rectangle",$tRectMin.x & ", " & $tRectMin.y & ", " & $tRectMin.width & ", " & $tRectMin.height)
  14. There is an opencv udf. I am not sure if it has that functionality. There is also a yolo udf.
×
×
  • Create New...