GDI Plus Array

  • Hallo zusammen,

    ich bin jetzt schon stundenlang an diesem Problem.
    hm...wie erklär ich's...

    Folgendes:

    1. Ich öffne ein Bild (ok)
    2. Ich wähle den Menüpunkt (ok)
    3. Ich drücke die Pfeiltasten zum positionieren des Textes
    4. Wenn ich den nächsten Eintrag aus dem Menü wähle und ich positioniere stimmt es nicht mehr.
    (Müsste quasie etliche _Update Func und Case...machen...)

    Das Problem:
    Es können mehrere Menüeinträge sein


    Ich möchte das gerne so machen:
    1. Text wählen, positionieren
    2. Text wählen positionieren u.s.w.
    3. Speichern fertig

    Spoiler anzeigen
    [autoit]


    #include <Array.au3>
    #include <GUIConstantsEx.au3>
    #include <gdiplus.au3>
    #include <misc.au3>

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Global $afont[8]
    _GDIPlus_Startup()
    $hImage = _GDIPlus_ImageLoadFromFile(FileOpenDialog("Bild auswählen", @ScriptDir, "Bilder (*.jpg)"))
    If Not $hImage Then Exit _GDIPlus_Shutdown()
    $iW = _GDIPlus_ImageGetWidth($hImage)
    $iH = _GDIPlus_ImageGetHeight($hImage)

    [/autoit] [autoit][/autoit] [autoit]

    $x = 140
    $y = 110

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    $Form1 = GUICreate("Form1", $iW, $iH)
    $MenuItem1 = GUICtrlCreateMenu("Texte und Schriften")
    $mnText1 = GUICtrlCreateMenuItem("Hunde", $MenuItem1)
    $mnText2 = GUICtrlCreateMenuItem("Katzen", $MenuItem1)
    GUISetState()

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Global $Text[4]

    [/autoit] [autoit][/autoit] [autoit]

    $Text[0] = "Welpen"
    $Text[1] = "Hunde"
    $Text[2] = "Katzen"
    $Text[3] = "Vögel"

    [/autoit] [autoit][/autoit] [autoit]

    ;_ArrayDisplay($Text)

    [/autoit] [autoit][/autoit] [autoit]

    $hGraphics = _GDIPlus_GraphicsCreateFromHWND($Form1)
    ;$hBitmap = _GDIPlus_BitmapCreateFromGraphics($iW, $iH, $hGraphics)
    $hBitmap = _GDIPlus_BitmapCreateFromGraphics($iW, $iH, $hGraphics)
    $hCtxt = _GDIPlus_ImageGetGraphicsContext($hBitmap)
    _GDIPlus_GraphicsSetSmoothingMode($hCtxt, 2)
    DllCall($ghGDIPDll, "uint", "GdipSetTextRenderingHint", "handle", $hCtxt, "int", 4)
    _GDIPlus_GraphicsDrawImage($hCtxt, $hImage, 0, 0)

    [/autoit] [autoit][/autoit] [autoit]

    _GDIPlus_GraphicsDrawImage($hGraphics, $hBitmap, 0, 0)
    ;$aFont = _ChooseFont()
    $hBrush = _GDIPlus_BrushCreateSolid(0xFF000000 + $afont[7])
    $hFormat = _GDIPlus_StringFormatCreate()
    $hFamily = _GDIPlus_FontFamilyCreate($afont[2])
    $hFont = _GDIPlus_FontCreate($hFamily, $afont[3], $afont[1])
    $tLayout = _GDIPlus_RectFCreate($x, $y, 1000, 1000)
    _GDIPlus_GraphicsDrawStringEx($hCtxt, $Text[1], $hFont, $tLayout, $hFormat, $hBrush)
    _GDIPlus_GraphicsDrawImage($hGraphics, $hBitmap, 0, 0)
    Global $hDLL = DllOpen("user32.dll")

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    While 1
    Switch GUIGetMsg()
    Case $GUI_EVENT_CLOSE
    _GDIPlus_ImageSaveToFile($hBitmap, @ScriptDir & "\Ilse.jpg")
    _GDIPlus_FontDispose($hFont)
    _GDIPlus_FontFamilyDispose($hFamily)
    _GDIPlus_StringFormatDispose($hFormat)
    _GDIPlus_BrushDispose($hBrush)
    _GDIPlus_GraphicsDispose($hGraphics)
    _GDIPlus_GraphicsDispose($hCtxt)
    _GDIPlus_Shutdown()
    DllClose($hDLL)
    GUIDelete()
    Exit

    [/autoit] [autoit][/autoit] [autoit]

    Case $mnText1
    _Schrift1()
    Case $mnText2
    _Schrift2()

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    EndSwitch
    If _IsPressed("25") Then
    $x -= 1
    DllStructSetData($tLayout, "X", $x)
    Update()
    ElseIf _IsPressed("27") Then
    $x += 1
    DllStructSetData($tLayout, "X", $x)
    Update()
    ElseIf _IsPressed("26") Then
    $y -= 1
    DllStructSetData($tLayout, "Y", $y)
    Update()
    ElseIf _IsPressed("28") Then
    $y += 1
    DllStructSetData($tLayout, "Y", $y)
    Update()
    EndIf
    WEnd

    [/autoit] [autoit][/autoit] [autoit]

    Func Update()
    ;MsgBox(0,"",$x&"-"&$y)
    _GDIPlus_GraphicsDrawImage($hCtxt, $hImage, 0, 0)
    _GDIPlus_GraphicsDrawStringEx($hCtxt, $Text[1], $hFont, $tLayout, $hFormat, $hBrush)
    ;_GDIPlus_GraphicsDrawStringEx($hCtxt, $Text2, $hFont, $tLayout, $hFormat, $hBrush)
    _GDIPlus_GraphicsDrawImage($hGraphics, $hBitmap, 0, 0)
    Return 1
    EndFunc ;==>Update

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Func _Schrift1()

    [/autoit] [autoit][/autoit] [autoit]

    _GDIPlus_GraphicsDrawImage($hGraphics, $hBitmap, 0, 0)
    $afont = _ChooseFont()
    $hBrush = _GDIPlus_BrushCreateSolid(0xFF000000 + $afont[7])
    $hFormat = _GDIPlus_StringFormatCreate()
    $hFamily = _GDIPlus_FontFamilyCreate($afont[2])
    $hFont = _GDIPlus_FontCreate($hFamily, $afont[3], $afont[1])
    $tLayout = _GDIPlus_RectFCreate($x, $y, 1000, 1000)
    _GDIPlus_GraphicsDrawStringEx($hCtxt, $Text[1], $hFont, $tLayout, $hFormat, $hBrush)
    _GDIPlus_GraphicsDrawImage($hGraphics, $hBitmap, 0, 0)
    Global $hDLL = DllOpen("user32.dll")
    EndFunc ;==>_Schrift1

    [/autoit] [autoit][/autoit] [autoit]

    Func _Schrift2()

    [/autoit] [autoit][/autoit] [autoit]

    _GDIPlus_GraphicsDrawImage($hGraphics, $hBitmap, 0, 0)
    $afont = _ChooseFont()
    $hBrush = _GDIPlus_BrushCreateSolid(0xFF000000 + $afont[7])
    $hFormat = _GDIPlus_StringFormatCreate()
    $hFamily = _GDIPlus_FontFamilyCreate($afont[2])
    $hFont = _GDIPlus_FontCreate($hFamily, $afont[3], $afont[1])
    $tLayout = _GDIPlus_RectFCreate($x, $y, 1000, 1000)
    _GDIPlus_GraphicsDrawStringEx($hCtxt, $Text[2], $hFont, $tLayout, $hFormat, $hBrush)
    _GDIPlus_GraphicsDrawImage($hGraphics, $hBitmap, 0, 0)
    Global $hDLL = DllOpen("user32.dll")
    EndFunc ;==>_Schrift2

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit]


    ...hoffe ihr habt da ne Idee

    Liebe Grüße
    Ilse ;)

    4 Mal editiert, zuletzt von Ilse (7. August 2012 um 14:57)

  • Du musst die Schrift auch auf das Hintergrundbild übertragen:

    Spoiler anzeigen
    [autoit]


    #include <Array.au3>
    #include <GUIConstantsEx.au3>
    #include <gdiplus.au3>
    #include <misc.au3>

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Global $afont[8]
    _GDIPlus_Startup()
    $hImage = _GDIPlus_ImageLoadFromFile(FileOpenDialog("Bild auswählen", @ScriptDir, "Bilder (*.jpg)"))
    If Not $hImage Then Exit _GDIPlus_Shutdown()
    $iW = _GDIPlus_ImageGetWidth($hImage)
    $iH = _GDIPlus_ImageGetHeight($hImage)
    $hCtxt_bg = _GDIPlus_ImageGetGraphicsContext($hImage)

    [/autoit] [autoit][/autoit] [autoit]

    $x = 140
    $y = 110

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    $Form1 = GUICreate("Form1", $iW, $iH)
    $MenuItem1 = GUICtrlCreateMenu("Texte und Schriften")
    $mnText1 = GUICtrlCreateMenuItem("Hunde", $MenuItem1)
    $mnText2 = GUICtrlCreateMenuItem("Katzen", $MenuItem1)
    GUISetState()

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Global $Text[4]

    [/autoit] [autoit][/autoit] [autoit]

    $Text[0] = "Welpen"
    $Text[1] = "Hunde"
    $Text[2] = "Katzen"
    $Text[3] = "Vögel"

    [/autoit] [autoit][/autoit] [autoit]

    ;_ArrayDisplay($Text)

    [/autoit] [autoit][/autoit] [autoit]

    $hGraphics = _GDIPlus_GraphicsCreateFromHWND($Form1)
    ;$hBitmap = _GDIPlus_BitmapCreateFromGraphics($iW, $iH, $hGraphics)
    $hBitmap = _GDIPlus_BitmapCreateFromGraphics($iW, $iH, $hGraphics)
    $hCtxt = _GDIPlus_ImageGetGraphicsContext($hBitmap)
    _GDIPlus_GraphicsSetSmoothingMode($hCtxt, 2)
    DllCall($ghGDIPDll, "uint", "GdipSetTextRenderingHint", "handle", $hCtxt, "int", 4)
    _GDIPlus_GraphicsDrawImage($hCtxt, $hImage, 0, 0)

    [/autoit] [autoit][/autoit] [autoit]

    _GDIPlus_GraphicsDrawImage($hGraphics, $hBitmap, 0, 0)
    ;$aFont = _ChooseFont()
    $hBrush = _GDIPlus_BrushCreateSolid(0xFF000000 + $afont[7])
    $hFormat = _GDIPlus_StringFormatCreate()
    $hFamily = _GDIPlus_FontFamilyCreate($afont[2])
    $hFont = _GDIPlus_FontCreate($hFamily, $afont[3], $afont[1])
    $tLayout = _GDIPlus_RectFCreate($x, $y, 1000, 1000)
    _GDIPlus_GraphicsDrawStringEx($hCtxt, $Text[1], $hFont, $tLayout, $hFormat, $hBrush)
    _GDIPlus_GraphicsDrawImage($hGraphics, $hBitmap, 0, 0)
    Global $hDLL = DllOpen("user32.dll")

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    While 1
    Switch GUIGetMsg()
    Case $GUI_EVENT_CLOSE
    _GDIPlus_ImageSaveToFile($hBitmap, @ScriptDir & "\Ilse.jpg")
    _GDIPlus_FontDispose($hFont)
    _GDIPlus_FontFamilyDispose($hFamily)
    _GDIPlus_StringFormatDispose($hFormat)
    _GDIPlus_BrushDispose($hBrush)
    _GDIPlus_GraphicsDispose($hCtxt_bg)
    _GDIPlus_GraphicsDispose($hGraphics)
    _GDIPlus_GraphicsDispose($hCtxt)
    _GDIPlus_Shutdown()
    DllClose($hDLL)
    GUIDelete()
    Exit

    [/autoit] [autoit][/autoit] [autoit]

    Case $mnText1
    _Schrift1()
    Case $mnText2
    _Schrift2()

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    EndSwitch
    If _IsPressed("25") Then
    $x -= 1
    DllStructSetData($tLayout, "X", $x)
    Update()
    ElseIf _IsPressed("27") Then
    $x += 1
    DllStructSetData($tLayout, "X", $x)
    Update()
    ElseIf _IsPressed("26") Then
    $y -= 1
    DllStructSetData($tLayout, "Y", $y)
    Update()
    ElseIf _IsPressed("28") Then
    $y += 1
    DllStructSetData($tLayout, "Y", $y)
    Update()
    ElseIf _IsPressed("0D") Then
    _GDIPlus_GraphicsDrawStringEx($hCtxt_bg, $Text[1], $hFont, $tLayout, $hFormat, $hBrush)
    EndIf
    WEnd

    [/autoit] [autoit][/autoit] [autoit]

    Func Update()
    ;MsgBox(0,"",$x&"-"&$y)
    _GDIPlus_GraphicsDrawImage($hCtxt, $hImage, 0, 0)
    _GDIPlus_GraphicsDrawStringEx($hCtxt, $Text[1], $hFont, $tLayout, $hFormat, $hBrush)
    ;_GDIPlus_GraphicsDrawStringEx($hCtxt, $Text2, $hFont, $tLayout, $hFormat, $hBrush)
    _GDIPlus_GraphicsDrawImage($hGraphics, $hBitmap, 0, 0)
    Return 1
    EndFunc ;==>Update

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Func _Schrift1()
    _GDIPlus_GraphicsDrawImage($hGraphics, $hBitmap, 0, 0)
    $afont = _ChooseFont()
    $hBrush = _GDIPlus_BrushCreateSolid(0xFF000000 + $afont[7])
    $hFormat = _GDIPlus_StringFormatCreate()
    $hFamily = _GDIPlus_FontFamilyCreate($afont[2])
    $hFont = _GDIPlus_FontCreate($hFamily, $afont[3], $afont[1])
    $tLayout = _GDIPlus_RectFCreate($x, $y, 1000, 1000)
    _GDIPlus_GraphicsDrawStringEx($hCtxt, $Text[1], $hFont, $tLayout, $hFormat, $hBrush)
    _GDIPlus_GraphicsDrawImage($hGraphics, $hBitmap, 0, 0)
    Global $hDLL = DllOpen("user32.dll")
    EndFunc ;==>_Schrift1

    [/autoit] [autoit][/autoit] [autoit]

    Func _Schrift2()

    [/autoit] [autoit][/autoit] [autoit]

    _GDIPlus_GraphicsDrawImage($hGraphics, $hBitmap, 0, 0)
    $afont = _ChooseFont()
    $hBrush = _GDIPlus_BrushCreateSolid(0xFF000000 + $afont[7])
    $hFormat = _GDIPlus_StringFormatCreate()
    $hFamily = _GDIPlus_FontFamilyCreate($afont[2])
    $hFont = _GDIPlus_FontCreate($hFamily, $afont[3], $afont[1])
    $tLayout = _GDIPlus_RectFCreate($x, $y, 1000, 1000)
    _GDIPlus_GraphicsDrawStringEx($hCtxt, $Text[2], $hFont, $tLayout, $hFormat, $hBrush)
    _GDIPlus_GraphicsDrawImage($hGraphics, $hBitmap, 0, 0)
    Global $hDLL = DllOpen("user32.dll")
    EndFunc ;==>_Schrift2

    [/autoit]

    Wenn du die Enter Taste drückst, wird der Text auf das Hintergrundbild kopiert.

    Gruß,
    UEZ

    Auch am Arsch geht ein Weg vorbei...

    ¯\_(ツ)_/¯

  • Hallo UEZ,

    schön daß du dich meldest.
    Klappt jetzt super.

    1000 DANK

    Noch ne Frage:

    ALso sobald man Return benutzt hat,
    gibt es kein zurück mehr.
    Ich meine, wenn ich den Menüeintrag erneut wähle,
    wäre es super wenn man das noch nachträglich wieder ändern kann

    Aber trotz allem:
    Klasse

    Liebe Grüße
    Ilse ;)

    2 Mal editiert, zuletzt von Ilse (31. Juli 2012 um 13:34)

  • Du willst aus vorgefertigten Texten (Menu) aussuchen können und diese dann im Bild positionieren?

    Spoiler anzeigen
    [autoit]


    #include <Array.au3>
    #include <GUIConstantsEx.au3>
    #include <gdiplus.au3>
    #include <misc.au3>

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Global $afont[8]
    _GDIPlus_Startup()
    $hImage = _GDIPlus_ImageLoadFromFile(FileOpenDialog("Bild auswählen", @ScriptDir, "Bilder (*.jpg)"))
    If Not $hImage Then Exit _GDIPlus_Shutdown()
    $iW = _GDIPlus_ImageGetWidth($hImage)
    $iH = _GDIPlus_ImageGetHeight($hImage)
    $hCtxt_bg = _GDIPlus_ImageGetGraphicsContext($hImage)
    _GDIPlus_GraphicsSetSmoothingMode($hCtxt_bg, 2)
    DllCall($ghGDIPDll, "uint", "GdipSetTextRenderingHint", "handle", $hCtxt_bg, "int", 4)

    [/autoit] [autoit][/autoit] [autoit]

    $x = 140
    $y = 110

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    $Form1 = GUICreate("Form1", $iW, $iH)
    $MenuItem1 = GUICtrlCreateMenu("Texte und Schriften")
    $mnText1 = GUICtrlCreateMenuItem("Hunde", $MenuItem1)
    $mnText2 = GUICtrlCreateMenuItem("Katzen", $MenuItem1)
    GUISetState()

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Global $Text[4]

    [/autoit] [autoit][/autoit] [autoit]

    $Text[0] = "Welpen"
    $Text[1] = "Hunde"
    $Text[2] = "Katzen"
    $Text[3] = "Vögel"

    [/autoit] [autoit][/autoit] [autoit]

    ;_ArrayDisplay($Text)

    [/autoit] [autoit][/autoit] [autoit]

    Global $aFont, $hBrush, $hFamily, $hFont, $hFormat, $tLayout, $aInfo
    $hGraphics = _GDIPlus_GraphicsCreateFromHWND($Form1)
    ;$hBitmap = _GDIPlus_BitmapCreateFromGraphics($iW, $iH, $hGraphics)
    $hBitmap = _GDIPlus_BitmapCreateFromGraphics($iW, $iH, $hGraphics)
    $hCtxt = _GDIPlus_ImageGetGraphicsContext($hBitmap)
    _GDIPlus_GraphicsSetSmoothingMode($hCtxt, 2)
    DllCall($ghGDIPDll, "uint", "GdipSetTextRenderingHint", "handle", $hCtxt, "int", 4)
    _GDIPlus_GraphicsDrawImage($hCtxt, $hImage, 0, 0)
    _GDIPlus_GraphicsDrawImage($hGraphics, $hBitmap, 0, 0)
    Global $hDLL = DllOpen("user32.dll")

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    While 1
    Switch GUIGetMsg()
    Case $GUI_EVENT_CLOSE
    _GDIPlus_ImageSaveToFile($hBitmap, @ScriptDir & "\Ilse.jpg")
    _GDIPlus_FontDispose($hFont)
    _GDIPlus_FontFamilyDispose($hFamily)
    _GDIPlus_StringFormatDispose($hFormat)
    _GDIPlus_BrushDispose($hBrush)
    _GDIPlus_GraphicsDispose($hCtxt_bg)
    _GDIPlus_GraphicsDispose($hGraphics)
    _GDIPlus_GraphicsDispose($hCtxt)
    _GDIPlus_Shutdown()
    DllClose($hDLL)
    GUIDelete()
    Exit

    [/autoit] [autoit][/autoit] [autoit]

    Case $mnText1
    $sText = $Text[1]
    _Schrift()
    Case $mnText2
    $sText = $Text[2]
    _Schrift()
    EndSwitch
    If _IsPressed("25") Then
    $x -= 1
    DllStructSetData($tLayout, "X", $x)
    Update()
    ElseIf _IsPressed("27") Then
    $x += 1
    DllStructSetData($tLayout, "X", $x)
    Update()
    ElseIf _IsPressed("26") Then
    $y -= 1
    DllStructSetData($tLayout, "Y", $y)
    Update()
    ElseIf _IsPressed("28") Then
    $y += 1
    DllStructSetData($tLayout, "Y", $y)
    Update()
    ElseIf _IsPressed("0D") Then
    While _IsPressed("0D")
    WEnd
    _GDIPlus_GraphicsDrawStringEx($hCtxt_bg, $sText, $hFont, $tLayout, $hFormat, $hBrush)
    ConsoleWrite("Text auf das Hintergrundbild kopiert!" & @LF)
    EndIf
    WEnd

    [/autoit] [autoit][/autoit] [autoit]

    Func Update()
    ;MsgBox(0,"",$x&"-"&$y)
    _GDIPlus_GraphicsDrawImage($hCtxt, $hImage, 0, 0)
    _GDIPlus_GraphicsDrawStringEx($hCtxt, $sText, $hFont, $tLayout, $hFormat, $hBrush)
    ;_GDIPlus_GraphicsDrawStringEx($hCtxt, $Text2, $hFont, $tLayout, $hFormat, $hBrush)
    _GDIPlus_GraphicsDrawImage($hGraphics, $hBitmap, 0, 0)
    Return 1
    EndFunc ;==>Update

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Func _Schrift()
    $tLayout = 0
    _GDIPlus_BrushDispose($hBrush)
    _GDIPlus_FontDispose($hFont)
    _GDIPlus_FontFamilyDispose($hFamily)
    _GDIPlus_StringFormatDispose($hFormat)
    $afont = _ChooseFont()
    If @error Then Return
    $hBrush = _GDIPlus_BrushCreateSolid(0xFF000000 + $afont[7])
    $hFormat = _GDIPlus_StringFormatCreate()
    $hFamily = _GDIPlus_FontFamilyCreate($afont[2])
    $hFont = _GDIPlus_FontCreate($hFamily, $afont[3], $afont[1])
    $tLayout = _GDIPlus_RectFCreate($x, $y, 0, 0)
    $aInfo = _GDIPlus_GraphicsMeasureString($hCtxt, $sText, $hFont, $tLayout, $hFormat)
    _GDIPlus_GraphicsDrawStringEx($hCtxt, $sText, $hFont, $aInfo[0], $hFormat, $hBrush)
    _GDIPlus_GraphicsDrawImage($hGraphics, $hBitmap, 0, 0)
    EndFunc ;==>_Schrift

    [/autoit]


    So was?

    Gruß,
    UEZ

    Auch am Arsch geht ein Weg vorbei...

    ¯\_(ツ)_/¯

  • Hallo UEZ,

    konnte mich gestern leider nicht mehr melden.

    Ich glaube ich kann mein Problem
    mit GDI nicht lösen. Ich weiß auch nicht ob das überhaupt machbar ist.

    Ich möchte eine Grafik laden. (das klappt)
    Auf diese Grafik sollen Texte. Auch mehrzeilige und die sollen positioniert
    werden und am Schluss mit der Grafik abgespeichert werden.
    Aber mit der Auswahl v. Texten über das Menü komme ich
    bei den mehrzeiligen an die Grenzen.
    D.h. Es müsste z.B.
    Textdatei 1 laden- und frei auf der Grafik positionieren
    Textdatei 2 dazuladen u.s.w
    um and Ende wenn alles positioniert Grafik mit Text speichern.

    Habe auch schon mit ini porobiert
    klappt irgend wie alles nicht mit mehrzeiligen Texten.


    Liebe Grüße
    Ilse ;)

  • Natürlich kann man das in GDI+ machen.
    Ich würde das Programm allerdings etwas anders anpacken - ich kann am Nachmittag evtl. was basteln...

    Sind die Texte "vorgefertigt" oder soll man einen beliebigen Text mit frei wählbaren Schriftarten und Farben eingeben können?

    lgE

  • Hallo Eukalyptus,

    das wäre toll wenn du mir da helfen könntest.

    Man sollte den Text frei gestalten können: Farbe, Schriftart...
    und direkt eingeben können.
    Das Problem ist:
    Man müsste alle Texte gleichzeitig sehen und positionieren können.
    Beim speichern wären dann Grafik und Text in einer neuen Datei: neuesBild.jpg zusammen.

    Super wäre es natürlich, wenn man den kpl, Text
    mit Positionen speichern und wieder laden könnte.


    Viele Grüße
    Ilse ;)

  • Hi Ilse,

    leider hatte ich keine Zeit was zu basteln. :(

    Ich habe mal den Basic Image Editor aus dem Windows Screenshooter extrahiert. Dort kannst du u.a. auch Texte auf das Bild zeichnen und rotieren (linke Maustaste gedrückt halten und Maus bewegen).

    Vielleicht hilft die das Ding weiter. Ich weiß, dass es für deine Zwecke überdimensioniert ist, aber was soll's...

    Gruß,
    UEZ

  • Hallo UEZ,

    merci für den Tipp.

    Übrigens Fehler beim Start
    ERROR: DllCallAddress()

    Grüße
    Ilse ;)

    Schließ mal den Thread (bin noch dran)
    und sage nochmal Danke
    an Eukalyptus und $Var und UEZ

  • Hallo UEZ,

    hab ich gemacht, alle Fehler sind weg.
    Danke

    Mal ne Frage zu dem Programm und ein paar Problemchen...

    • Darf man das Programm so mitgeben?
    • Kann man z.B. mit Controlsend die Befehle im Hintergrund ausführen ohne daß man die Oberfläche sieht.
    • Kann man den Text zentrieren? Hab nichts gefunden.
    • Alt Tastaturabkürzungen für das Menü gehen nicht(z.B. Alt T für Text)


    Grüße Ilse ;)

    Einmal editiert, zuletzt von Ilse (7. August 2012 um 13:44)

  • Hallo UEZ,

    hab ich gemacht, alle Fehler sind weg.
    Danke

    Mal ne Frage zu dem Programm und ein paar Problemchen...

    • Darf man das Programm so mitgeben?
    • Kann man z.B. mit Controlsend die Befehle im Hintergrund ausführen ohne daß man die Oberfläche sieht.
    • Kann man den Text zentrieren? Hab nichts gefunden.
    • Alt Tastaturabkürzungen für das Menü gehen nicht(z.B. Alt T für Text)


    Grüße Ilse ;)

    Wem willst du das Programm mitgeben? Es ist eigentlich ein Bestandteil von dem Screenshooter und so eigentlich nicht vollständig separat zu laufen. Eigentlich sollte es nur dir nützlich sein.
    Keine Ahnung, ob man mit Controlsend das Ding "kontrollieren" kann; einfach ausprobieren.
    Zentrieren ist nicht implementiert, kann es aber hinzufügen.
    Bezgl. der Tastenabkürzungen muss ich auch mal schauen.

    Gruß,
    UEZ

    Auch am Arsch geht ein Weg vorbei...

    ¯\_(ツ)_/¯

  • Hallo UEZ,

    danke für die Info.
    Mit mitgeben/weitergeben..., meinte ich
    darf ich an dem Code arbeiten und z.B. eine exe machen
    ohne Rechte u.s.w. zu verletzen.

    Habe mit Controlsend probiert, ist aber an den Tastaturabkürzungen gescheitert.
    Geht das überhaupt, daß man dann Befehle im Hintergrund ausführen kann
    ohne das Fenster zu sehen. Also ohne Winactivate...?

    Liebe Grüße
    Ilse ;)

  • Klar kannst du den Code bearbeiten, modifizieren und daraus eine Exe machen. Ansonsten hätte ich den Source Code nicht gepostet. ;)

    Ich meine mit ControlSend kannst du auch arbeiten, ohne dass die GUI aktiv sein muss (arbeite kaum mit Automatisierungen mit den Send Befehlen).

    Gruß,
    UEZ

    Auch am Arsch geht ein Weg vorbei...

    ¯\_(ツ)_/¯

  • Hallo UEZ,

    merci für den Hinweis.
    Kannst du vielleicht nochmal drüberschauen
    mit den Tastaturabkürzungen?

    Wäre toll wenn das klappen würde.


    Liebe Grüße
    Ilse ;)