Re: [MSEide-MSEgui-talk] MSE Canvas. (Answer from Martin)

2017-09-26 Thread fredvs
Ooops, your message did not appear in nabble.com --> here a copy:

On Tuesday 26 September 2017 15:05:21 fredvs wrote:
> Hello Martin.
>
> How to draw lines on a canvas with MSE ?
>
> For example,
> LCL: Canvas.Line(x,y, cx, cy)...
> fpGUI: Canvas.drawLine(x,y,cx,cy)...
>
See lib/common/graphics/msegraphics.pas tcanvas:
"
   procedure drawline(const startpoint,endpoint: pointty;
const acolor: colorty = cl_default);
   procedure drawline(const startpoint: pointty; const length: sizety;
const acolor: colorty = cl_default);
   procedure drawlinesegments(const apoints: array of segmentty;
 const acolor: colorty = cl_default);

   procedure drawlines(const apoints: array of pointty;
   const aclosed: boolean = false;
   const acolor: colorty = cl_default;
  const first: integer = 0; const acount: integer = -1);
overload;
   //-1 = all
   procedure drawlines(const apoints: array of pointty;
   const abreaks: array of integer; //ascending order
   const aclosed: boolean = false;
   const acolor: colorty = cl_default;
  const first: integer = 0; const acount: integer = -1);
overload;

   procedure drawvect(const startpoint: pointty; 
   const direction: graphicdirectionty;
   const length: integer; const acolor: colorty =
cl_default);
   overload;
   procedure drawvect(const startpoint: pointty;
  const direction: graphicdirectionty;
  const length: integer; out endpoint: pointty;
  const acolor: colorty = cl_default); overload;
"
> Does it exist a demo of some use of MSE canvas/draw lines ?
>
http://freepascal.ru/article/mse/20060205191314/
"mp()" is a shorthand of "makepoint()", ms() of makesize().

> Would it be possible to draw on the canvas of a TSlider.scrollbar.face ?
> This to draw the wave-form of a song as background of a slider.
>
Activate tslider.scrollbar.face, select a tfacecomp in template and use 
tfacecomp.onafterpaint.
"
procedure tmainfo.faceafterpaint(const sender: tcustomface;
   const canvas: tcanvas; const arect: rectty);
begin
 canvas.drawline(arect.pos,ms(arect.cx-1,arect.cy-1),cl_red);
 //ms is shorthand for makesize
end;
"
Needs MSEgui git master 49a6c90d8643b5b01b6ea3c3a31ecaebf564cd56 because of
a 
regression.



--
Sent from: http://mseide-msegui-talk.13964.n8.nabble.com/

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] MSE Canvas.

2017-09-26 Thread Martin Schreiber
On Tuesday 26 September 2017 15:05:21 fredvs wrote:
> Hello Martin.
>
> How to draw lines on a canvas with MSE ?
>
> For example,
> LCL: Canvas.Line(x,y, cx, cy)...
> fpGUI: Canvas.drawLine(x,y,cx,cy)...
>
See lib/common/graphics/msegraphics.pas tcanvas:
"
   procedure drawline(const startpoint,endpoint: pointty;
const acolor: colorty = cl_default);
   procedure drawline(const startpoint: pointty; const length: sizety;
const acolor: colorty = cl_default);
   procedure drawlinesegments(const apoints: array of segmentty;
 const acolor: colorty = cl_default);

   procedure drawlines(const apoints: array of pointty;
   const aclosed: boolean = false;
   const acolor: colorty = cl_default;
  const first: integer = 0; const acount: integer = -1); overload;
   //-1 = all
   procedure drawlines(const apoints: array of pointty;
   const abreaks: array of integer; //ascending order
   const aclosed: boolean = false;
   const acolor: colorty = cl_default;
  const first: integer = 0; const acount: integer = -1); overload;

   procedure drawvect(const startpoint: pointty; 
   const direction: graphicdirectionty;
   const length: integer; const acolor: colorty = cl_default);
   overload;
   procedure drawvect(const startpoint: pointty;
  const direction: graphicdirectionty;
  const length: integer; out endpoint: pointty;
  const acolor: colorty = cl_default); overload;
"
> Does it exist a demo of some use of MSE canvas/draw lines ?
>
http://freepascal.ru/article/mse/20060205191314/
"mp()" is a shorthand of "makepoint()", ms() of makesize().

> Would it be possible to draw on the canvas of a TSlider.scrollbar.face ?
> This to draw the wave-form of a song as background of a slider.
>
Activate tslider.scrollbar.face, select a tfacecomp in template and use 
tfacecomp.onafterpaint.
"
procedure tmainfo.faceafterpaint(const sender: tcustomface;
   const canvas: tcanvas; const arect: rectty);
begin
 canvas.drawline(arect.pos,ms(arect.cx-1,arect.cy-1),cl_red);
 //ms is shorthand for makesize
end;
"
Needs MSEgui git master 49a6c90d8643b5b01b6ea3c3a31ecaebf564cd56 because of a 
regression.
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] MSE Canvas.

2017-09-26 Thread Fred van Stappen

Wow.


White night tonight ?


Many thanks


Fre;D.


De : Martin Schreiber 
Envoyé : mardi 26 septembre 2017 17:03
À : mseide-msegui-talk@lists.sourceforge.net
Objet : Re: [MSEide-MSEgui-talk] MSE Canvas.

On Tuesday 26 September 2017 15:05:21 fredvs wrote:
> Hello Martin.
>
> How to draw lines on a canvas with MSE ?
>
> For example,
> LCL: Canvas.Line(x,y, cx, cy)...
> fpGUI: Canvas.drawLine(x,y,cx,cy)...
>
See lib/common/graphics/msegraphics.pas tcanvas:
"
   procedure drawline(const startpoint,endpoint: pointty;
const acolor: colorty = cl_default);
   procedure drawline(const startpoint: pointty; const length: sizety;
const acolor: colorty = cl_default);
   procedure drawlinesegments(const apoints: array of segmentty;
 const acolor: colorty = cl_default);

   procedure drawlines(const apoints: array of pointty;
   const aclosed: boolean = false;
   const acolor: colorty = cl_default;
  const first: integer = 0; const acount: integer = -1); overload;
   //-1 = all
   procedure drawlines(const apoints: array of pointty;
   const abreaks: array of integer; //ascending order
   const aclosed: boolean = false;
   const acolor: colorty = cl_default;
  const first: integer = 0; const acount: integer = -1); overload;

   procedure drawvect(const startpoint: pointty;
   const direction: graphicdirectionty;
   const length: integer; const acolor: colorty = cl_default);
   overload;
   procedure drawvect(const startpoint: pointty;
  const direction: graphicdirectionty;
  const length: integer; out endpoint: pointty;
  const acolor: colorty = cl_default); overload;
"
> Does it exist a demo of some use of MSE canvas/draw lines ?
>
http://freepascal.ru/article/mse/20060205191314/
MSEide+MSEgui. Урок рисования. - 
FreePascal.ru
freepascal.ru
Информационный портал для разработчиков на Free Pascal & Lazarus & MSE



"mp()" is a shorthand of "makepoint()", ms() of makesize().

> Would it be possible to draw on the canvas of a TSlider.scrollbar.face ?
> This to draw the wave-form of a song as background of a slider.
>
Activate tslider.scrollbar.face, select a tfacecomp in template and use
tfacecomp.onafterpaint.
"
procedure tmainfo.faceafterpaint(const sender: tcustomface;
   const canvas: tcanvas; const arect: rectty);
begin
 canvas.drawline(arect.pos,ms(arect.cx-1,arect.cy-1),cl_red);
 //ms is shorthand for makesize
end;
"
Needs MSEgui git master 49a6c90d8643b5b01b6ea3c3a31ecaebf564cd56 because of a
regression.
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] MSE Canvas.

2017-09-26 Thread Martin Schreiber
On Tuesday 26 September 2017 17:03:20 Martin Schreiber wrote:

> > Would it be possible to draw on the canvas of a TSlider.scrollbar.face ?
> > This to draw the wave-form of a song as background of a slider.
>
> Activate tslider.scrollbar.face, select a tfacecomp in template and use
> tfacecomp.onafterpaint.
> "
> procedure tmainfo.faceafterpaint(const sender: tcustomface;
>const canvas: tcanvas; const arect: rectty);
> begin
>  canvas.drawline(arect.pos,ms(arect.cx-1,arect.cy-1),cl_red);
>  //ms is shorthand for makesize
> end;
> "
Probably more efficient is to paint the background image one time to 
tslider.scrollbar.face.image.cavas.

Martin

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


[MSEide-MSEgui-talk] Mailing list problems

2017-09-26 Thread Martin Schreiber
Hi,
SourceForge was down some hours -> I had to repost some missing mails.

Martin

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] Application paused if no mouse event.

2017-09-26 Thread Martin Schreiber
> There is application.queueasynccall() ...

Ha, ** VERY MUCH ** better. ;-)

---> No more underrun error, no scratch when opening dialog files, no
scratch when switching float<>tab or opening/closing forms.

Synchronization: perfect. (maybe even better than fpc-queue()).

OK, re-come back to {$DEFINE mse} when using uos (that was updated, of
course).

Well done Martin.

Fre;D



--
Sent from: http://mseide-msegui-talk.13964.n8.nabble.com/

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] MSE Canvas.

2017-09-26 Thread Martin Schreiber
On Tuesday 26 September 2017 15:05:21 fredvs wrote:
> Hello Martin.
>
> How to draw lines on a canvas with MSE ?
>
> For example,
> LCL: Canvas.Line(x,y, cx, cy)...
> fpGUI: Canvas.drawLine(x,y,cx,cy)...
>
See lib/common/graphics/msegraphics.pas tcanvas:
"
   procedure drawline(const startpoint,endpoint: pointty;
const acolor: colorty = cl_default);
   procedure drawline(const startpoint: pointty; const length: sizety;
const acolor: colorty = cl_default);
   procedure drawlinesegments(const apoints: array of segmentty;
 const acolor: colorty = cl_default);

   procedure drawlines(const apoints: array of pointty;
   const aclosed: boolean = false;
   const acolor: colorty = cl_default;
  const first: integer = 0; const acount: integer = -1); overload;
   //-1 = all
   procedure drawlines(const apoints: array of pointty;
   const abreaks: array of integer; //ascending order
   const aclosed: boolean = false;
   const acolor: colorty = cl_default;
  const first: integer = 0; const acount: integer = -1); overload;

   procedure drawvect(const startpoint: pointty; 
   const direction: graphicdirectionty;
   const length: integer; const acolor: colorty = cl_default);
   overload;
   procedure drawvect(const startpoint: pointty;
  const direction: graphicdirectionty;
  const length: integer; out endpoint: pointty;
  const acolor: colorty = cl_default); overload;
"
> Does it exist a demo of some use of MSE canvas/draw lines ?
>
http://freepascal.ru/article/mse/20060205191314/
"mp()" is a shorthand of "makepoint()", ms() of makesize().

> Would it be possible to draw on the canvas of a TSlider.scrollbar.face ?
> This to draw the wave-form of a song as background of a slider.
>
Activate tslider.scrollbar.face, select a tfacecomp in template and use 
tfacecomp.onafterpaint.
"
procedure tmainfo.faceafterpaint(const sender: tcustomface;
   const canvas: tcanvas; const arect: rectty);
begin
 canvas.drawline(arect.pos,ms(arect.cx-1,arect.cy-1),cl_red);
 //ms is shorthand for makesize
end;
"
Needs MSEgui git master 49a6c90d8643b5b01b6ea3c3a31ecaebf564cd56 because of a 
regression.
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] MSE Canvas.

2017-09-26 Thread Martin Schreiber
On Tuesday 26 September 2017 17:03:20 Martin Schreiber wrote:

> > Would it be possible to draw on the canvas of a TSlider.scrollbar.face ?
> > This to draw the wave-form of a song as background of a slider.
>
> Activate tslider.scrollbar.face, select a tfacecomp in template and use
> tfacecomp.onafterpaint.
> "
> procedure tmainfo.faceafterpaint(const sender: tcustomface;
>const canvas: tcanvas; const arect: rectty);
> begin
>  canvas.drawline(arect.pos,ms(arect.cx-1,arect.cy-1),cl_red);
>  //ms is shorthand for makesize
> end;
> "
Probably more efficient is to paint the background image one time to 
tslider.scrollbar.face.image.cavas.

Martin

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] About MSE TFilelistview.

2017-09-26 Thread Martin Schreiber
On Tuesday 26 September 2017 15:57:29 fredvs wrote:
> >> Is it possible to apply a filter?
> >
> > tfilelistview.mask:= '"*.you" "*.she" "*.me"'.
>
> Does not work here:
>
> filelistfo.list_files.path := dir.value;

That sets the mask and loads the files.
"
filelistfo.list_files.path:= './*.mp3';
"
loads the mp3 files of currentdirectory.

> filelistfo.list_files.mask := '"*.mp3" "*.wav" "*.ogg" "*.flac"';
>
sets the mask for next readlist() command.
"
filelistfo.list_files.directory:= './';
"
sets the directory for the next readlist() command.
"
 filelistfo.list_files.readlist();
"
reads the mp3, wav, ogg and flac files of the current directory.

Martin

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] Application paused if no mouse event.

2017-09-26 Thread fredvs
> There is application.queueasynccall() ...

Ha, ** VERY MUCH ** better. ;-)

---> No more underrun error, no scratch when opening dialog files, no
scratch when switching float<>tab or opening/closing forms.

Synchronization: perfect. (maybe even better than fpc-queue()).

OK, re-come back to {$DEFINE mse} when using uos (that was updated, of
course).

Well done Martin.

Fre;D



--
Sent from: http://mseide-msegui-talk.13964.n8.nabble.com/

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] About MSE TFilelistview.

2017-09-26 Thread fredvs
>> Is it possible to apply a filter? 
> tfilelistview.mask:= '"*.you" "*.she" "*.me"'. 

Does not work here:

filelistfo.list_files.path := dir.value;
filelistfo.list_files.mask := '"*.mp3" "*.wav" "*.ogg" "*.flac"';

---> 

 

Fre;D



--
Sent from: http://mseide-msegui-talk.13964.n8.nabble.com/

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


[MSEide-MSEgui-talk] MSE Canvas.

2017-09-26 Thread fredvs
Hello Martin.

How to draw lines on a canvas with MSE ?

For example, 
LCL: Canvas.Line(x,y, cx, cy)...
fpGUI: Canvas.drawLine(x,y,cx,cy)...

Does it exist a demo of some use of MSE canvas/draw lines ?

Would it be possible to draw on the canvas of a TSlider.scrollbar.face ?
This to draw the wave-form of a song as background of a slider.

See simulated image:
 

Or maybe it will be easier to create a slider from scratch.

Thanks.

Fre;D




--
Sent from: http://mseide-msegui-talk.13964.n8.nabble.com/

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] Application paused if no mouse event.

2017-09-26 Thread fredvs
> There is application.queueasynccall() 

OK, I will try this.

Asap.

Thanks.

Fre;D



--
Sent from: http://mseide-msegui-talk.13964.n8.nabble.com/

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] About MSE TFilelistview.

2017-09-26 Thread fredvs
> Please use a tstringgrid or a twidgetgrid with the wanted columns and fill
it 
> with the data provided by a tfiledatalist in unit msefileutils. .

Ha, ok, I will try.

Thanks.

Fre;D




--
Sent from: http://mseide-msegui-talk.13964.n8.nabble.com/

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk