[Windows] 2DDrawing Befehle mit AntiAliasing durch GDI+
Re: [Windows] 2DDrawing Befehle mit AntiAliasing durch GDI+
Bitte und danke für die schnellen Bug-Fixes.
PB 6.01 ― Win 10, 21H2 ― Ryzen 9 3900X, 32 GB ― NVIDIA GeForce RTX 3080 ― Vivaldi 6.0 ― www.unionbytes.de
Aktuelles Projekt: Lizard - Skriptsprache für symbolische Berechnungen und mehr
Aktuelles Projekt: Lizard - Skriptsprache für symbolische Berechnungen und mehr
Re: [Windows] 2DDrawing Befehle mit AntiAliasing durch GDI+
Update v0.83
DOWNLOAD: gDrawing_v0.83.zip oder gDrawing_v0.83.zip (75k)
Code: Alles auswählen
Changes/Änderungen:
- Added import libraries for gdiplus.dll (gdiplus_x86.lib & gdiplus_x64.lib)
-> the import libraries are used now by Default!
To use the old way with OpenLibrary(), declare the constant
#gDrawing_NO_DLL_IMPORT=1 before XIncludeFile "gDrawing.pbi"
- Added example19.pb, draw on screen
- Fixed text drawing problem with font offset (reported by Stargate)
- Fixed some small 64bit problems
- removed #PB_Font_Default constant for PB4.60
cya,
...Danilo
"Ein Genie besteht zu 10% aus Inspiration und zu 90% aus Transpiration" - Max Planck
...Danilo
"Ein Genie besteht zu 10% aus Inspiration und zu 90% aus Transpiration" - Max Planck
Re: [Windows] 2DDrawing Befehle mit AntiAliasing durch GDI+
cya,
...Danilo
"Ein Genie besteht zu 10% aus Inspiration und zu 90% aus Transpiration" - Max Planck
...Danilo
"Ein Genie besteht zu 10% aus Inspiration und zu 90% aus Transpiration" - Max Planck
Re: [Windows] 2DDrawing Befehle mit AntiAliasing durch GDI+
Hallo Danilo,
ich bin gerade auf der Suche nach einer Funktion, mit der ich das Verhalten eines Pfades an den Ecken beeinflussen kann.
Damit meine ich, dass es zwar mit gSetPenCaps() Anfang und Ende definieren kann (rund, eckig, ...) aber irgendwie nicht wie es mittig aussehen soll.
Ich habe nämlich gerade einen Pfad, wo ich sehr spitze Winkel habe, und dort möchte ich keine spitzen Ecken haben, sonden abgeflachte oder runde.
ich bin gerade auf der Suche nach einer Funktion, mit der ich das Verhalten eines Pfades an den Ecken beeinflussen kann.
Damit meine ich, dass es zwar mit gSetPenCaps() Anfang und Ende definieren kann (rund, eckig, ...) aber irgendwie nicht wie es mittig aussehen soll.
Ich habe nämlich gerade einen Pfad, wo ich sehr spitze Winkel habe, und dort möchte ich keine spitzen Ecken haben, sonden abgeflachte oder runde.
PB 6.01 ― Win 10, 21H2 ― Ryzen 9 3900X, 32 GB ― NVIDIA GeForce RTX 3080 ― Vivaldi 6.0 ― www.unionbytes.de
Aktuelles Projekt: Lizard - Skriptsprache für symbolische Berechnungen und mehr
Aktuelles Projekt: Lizard - Skriptsprache für symbolische Berechnungen und mehr
Re: [Windows] 2DDrawing Befehle mit AntiAliasing durch GDI+
Meintest Du als Beispiel mit 2 Linien als Path:STARGÅTE hat geschrieben:ich bin gerade auf der Suche nach einer Funktion, mit der ich das Verhalten eines Pfades an den Ecken beeinflussen kann.
Damit meine ich, dass es zwar mit gSetPenCaps() Anfang und Ende definieren kann (rund, eckig, ...) aber irgendwie nicht wie es mittig aussehen soll.
Ich habe nämlich gerade einen Pfad, wo ich sehr spitze Winkel habe, und dort möchte ich keine spitzen Ecken haben, sonden abgeflachte oder runde.
Code: Alles auswählen
gDrawingMode(#PB_2DDrawing_Path)
gLineXY(10,10,35,300)
gLineXY(35,300,60,10)
gDrawingMode(#PB_2DDrawing_Outlined)
gSetPenSize(9)
gDrawPath(#PB_Default,RGBA($00,$00,$00,$FF))
mit "aber irgendwie nicht wie es mittig aussehen soll"?
Wenn es nur das ist, dann kein Problem. Habe ich gerade eingebaut, muß aber
nochmal checken und mache vielleicht noch paar Dinge von der ToDo-Liste dazu.
PS: Ich merke gerade, das funktioniert nur im Outline Modus, nicht mit gefülltem Path.
cya,
...Danilo
"Ein Genie besteht zu 10% aus Inspiration und zu 90% aus Transpiration" - Max Planck
...Danilo
"Ein Genie besteht zu 10% aus Inspiration und zu 90% aus Transpiration" - Max Planck
Re: [Windows] 2DDrawing Befehle mit AntiAliasing durch GDI+
Jo, genau, das meinte ich, danke, dann warte ich mal.
PB 6.01 ― Win 10, 21H2 ― Ryzen 9 3900X, 32 GB ― NVIDIA GeForce RTX 3080 ― Vivaldi 6.0 ― www.unionbytes.de
Aktuelles Projekt: Lizard - Skriptsprache für symbolische Berechnungen und mehr
Aktuelles Projekt: Lizard - Skriptsprache für symbolische Berechnungen und mehr
Re: [Windows] 2DDrawing Befehle mit AntiAliasing durch GDI+
Entschuldige bitte die Wartezeit auf v0.84, ich hoffe ich habe Dein Projekt nicht
zu lange aufgehalten.
DOWNLOAD: gDrawing_v0.84.zip oder gDrawing_v0.84.zip (83k)
zu lange aufgehalten.
DOWNLOAD: gDrawing_v0.84.zip oder gDrawing_v0.84.zip (83k)
Code: Alles auswählen
gDrawing v0.84, 15. Jan. 2012
- added commands
gSetPenLineJoin( lineJoin.l )
set line join mode, requested by Stargate
mode is one of the following constants:
#PenLineJoinMiter (default)
#PenLineJoinBevel
#PenLineJoinRound
#PenLineJoinMiterClipped
gSetPenMiterLimit( miterLimit.f )
set miter limit for line joins
gGetFontList( List fontList.s() )
get GDI+ font list (font family names)
gDrawRotatedFormattedText( x.f, y.f, width.f, height.f, Text$, angle.f [, color.q] )
draw rotated formatted text, see gDrawFormattedText()
gDrawFormattedText( x.f, y.f, width.f, height.f, Text$ [, color.q] )
draw formatted text into the rectangle specified by "x,y,width,height"
use gSetDrawTextFlags() to set the flags for formatting
gSetDrawTextFlags( flags.l )
set the formatting options for gDrawFormattedText()
flags is a combination of the following constants:
#DrawTextFullLinesOnly - draws last line on bottom only if fully visible
#DrawTextMeasureTrailingSpaces - include trailing spaces in measurement for text alignment
#DrawTextNoWordWrap - no automatic wordwrap at line end
#DrawTextNoHotkey - no hotkey (ampersand) processing
#DrawTextShowHotkey - process ampersand '&' and underline the next char.
to display an ampersand, use it 2 times: &&
#DrawTextHideHotkey - process ampersand '&' but do not display underlined chars.
to display an ampersand, use it 2 times: &&
the following group defines how text on each line
is aligned horizontally.
you can only use 1 constant out of this group:
#DrawTextLeftAligned - text is horizontally left aligned
#DrawTextCentered - text is horizontally centered
#DrawTextRightAligned - text is horizontally right aligned
the following group defines how text lines
are aligned vertically.
you can only use 1 constant out of this group:
#DrawTextLineTopAligned - text lines are vertically top aligned
#DrawTextLineCentered - text lines are vertically center aligned
#DrawTextLineBottomAligned - text lines are vertically bottom aligned
the following group defines how text is cut/trimmed at the end
if the text does not fit in the rectangle specified by gDrawFormattedText().
you can only use 1 constant out of this group:
#DrawTextNoTrimming - no trimming
#DrawTextCharacterTrimming - cut at character boundary
#DrawTextWordTrimming - cut at word boundary
#DrawTextEllipsisCharacterTrimming - cut at character boundary and display ellipsis '...'
#DrawTextEllipsisWordTrimming - cut at word boundary and display ellipsis '...'
#DrawTextEllipsisPathTrimming - cut in the center and display ellipsis '...'
(for example: "http://pure...com/forums")
- added examples
example 21 - test gSetPenLineJoin()
example 22 - quick test for gDrawFormattedText()
example 23 - shows continuous text (running text) with resizable window
example 24 - little font browser that displays the gGetFontList()
cya,
...Danilo
"Ein Genie besteht zu 10% aus Inspiration und zu 90% aus Transpiration" - Max Planck
...Danilo
"Ein Genie besteht zu 10% aus Inspiration und zu 90% aus Transpiration" - Max Planck
Re: [Windows] 2DDrawing Befehle mit AntiAliasing durch GDI+
Ach quatsch, ich habe nur "zwischendurch" einen Funktionsplotter geschrieben, der u.a. sache wie Sin(1/x) sauber um x=0 darstellen soll (ohne dabei auch auf "geraden Strecken" unötige Pfadpunkte zu haben). Da nahe 0 die Schwingungen sehr schnell werden, sind die Extrema sehr spitz, was zu unschönnen Nebeneffekten geführt hat. Deswegen brauchte ich runde Ecken.Entschuldige bitte die Wartezeit auf v0.84, ich hoffe ich habe Dein Projekt nicht
zu lange aufgehalten.
An dieser Stelle wieder mal Danke, für das neue Update.
PB 6.01 ― Win 10, 21H2 ― Ryzen 9 3900X, 32 GB ― NVIDIA GeForce RTX 3080 ― Vivaldi 6.0 ― www.unionbytes.de
Aktuelles Projekt: Lizard - Skriptsprache für symbolische Berechnungen und mehr
Aktuelles Projekt: Lizard - Skriptsprache für symbolische Berechnungen und mehr
Re: [Windows] 2DDrawing Befehle mit AntiAliasing durch GDI+
Hallo Danilo,
habe gerade das neue gDrawFormattedText entdeckt und dachte es könnte mein "eigene" Umbruch-Prozeduren ersetzen.
Leider musste ich jedoch feststellen, dass zwar gDrawFormattedText richtig arbeitet, aber ich garnicht mit gTextWidth() und gTextHeight() an die Abmessungen des formatierten Text komme.
Klar, dort gebe ich ja auch nirgends die Breite und Höhe des nutzbaren Bereiches an.
Gibt es da eine möglichkeit?
PS: Nein, es ist nicht dringend, sonden nur wünschenswert für die nächste Version.
habe gerade das neue gDrawFormattedText entdeckt und dachte es könnte mein "eigene" Umbruch-Prozeduren ersetzen.
Leider musste ich jedoch feststellen, dass zwar gDrawFormattedText richtig arbeitet, aber ich garnicht mit gTextWidth() und gTextHeight() an die Abmessungen des formatierten Text komme.
Klar, dort gebe ich ja auch nirgends die Breite und Höhe des nutzbaren Bereiches an.
Gibt es da eine möglichkeit?
PS: Nein, es ist nicht dringend, sonden nur wünschenswert für die nächste Version.
PB 6.01 ― Win 10, 21H2 ― Ryzen 9 3900X, 32 GB ― NVIDIA GeForce RTX 3080 ― Vivaldi 6.0 ― www.unionbytes.de
Aktuelles Projekt: Lizard - Skriptsprache für symbolische Berechnungen und mehr
Aktuelles Projekt: Lizard - Skriptsprache für symbolische Berechnungen und mehr
Re: [Windows] 2DDrawing Befehle mit AntiAliasing durch GDI+
Muss ich nochmal schauen, aber mir ist so aus dem Kopf nichts bekannt.STARGÅTE hat geschrieben:Gibt es da eine möglichkeit?
Die Funktion ist ja auch eher da um in einen definierten Bereich auszugeben
und automatisch die visuelle Anzeige anzupassen, z.B. mit '...' am Ende, wenn
der Text nicht reinpasst. Hatte auch nichts gesehen um eine eigene Umbruch-
funktion dabei anzugeben, was ich sonst eingebaut hätte. Ich schaue nochmal.
cya,
...Danilo
"Ein Genie besteht zu 10% aus Inspiration und zu 90% aus Transpiration" - Max Planck
...Danilo
"Ein Genie besteht zu 10% aus Inspiration und zu 90% aus Transpiration" - Max Planck