yashsingh1/xdaforums huggingface dataset:
[Android Apps and Games] acadoid:
[MENTION=5637234]dragon005[/MENTION]: A shape detection might work on simple geometrical shapes such as a line but it will certainly not help for more complex objects such as a coordinate system.

Note that there is a separate thread concerning custom drawing tools, http://xdaforums.com/showthread.php?t=2610695.
[Android Apps and Games] dragon005:
You are right this could work for simple geometrical shapes , but most users just use simple shapes and don't need complex ones , and even complex shapes can be made by a shape detection (piece by piece) , and it will be great if you add a feature to save the created shapes as custom drawing tool .
[Android Apps and Games] herph:
Re: Datestamps

You truly have to be the most responsive developer ever. Amazing. Thank you, that worked perfectly.

Ok, my new dream is to somehow automatically make the page creation date a searchable keyword, well actually I really want just the first instance of a date to register, but that is getting greedy.

I looked through the custom commands, but I couldn't see anyway to do this. Admittedly I know practically nothing about JavaScript, so it may be in plain sight... Any thoughts?
[Android Apps and Games] acadoid:
[MENTION=5786315]herph[/MENTION]: The page creation date is not searchable, but this is an interesting idea.

You could add a time-stamp in the text layer of a page directly after creating it, the content of the text layer is searchable.
[Android Apps and Games] herph:
And I presume there is no way to automatically generate a timestamp on a hidden layer. Ok, put that on my wishlist. Speaking of, where would I submit other feature requests?
[Android Apps and Games] acadoid:
[MENTION=5786315]herph[/MENTION]: No, this cannot be done automatically.

Send your suggestion to me by email, this allows me to conveniently keep track of them.
[Android Apps and Games] dragon005:
Hello ,can someone write me a custom drawing code for parallelogram as this one "bscstudent.buffalostate.edu/kajfkr79/web/Masters_Project/parallelogram.jpg"
[Android Apps and Games] acadoid:
[MENTION=5637234]dragon005[/MENTION]: How do you wish to control the parallelogram? There is only a start and an end point, and two points do not uniquely define a parallelogram, do they?

Note that this is actually the wrong thread, there is a one specific for drawing tools http://xdaforums.com/showthread.php?t=2610695.
[Android Apps and Games] dragon005:
Thank you for responding , i am Sorry , i didn't notice the other thread , i want the parallelogram to be working exactly like the [custom drawing tool (rectangle)] which only have a start and end point and it's size increase and decrease as i move my finger on screen
[Android Apps and Games] acadoid:
[MENTION=5637234]dragon005[/MENTION]: For a rectangle, two points in opposite corners uniquely define the shape. This is not the case for a parallelogram, you need three points to uniquely define a parallelogram. For instance in http://www.excellup.com/classnine/mathnine/mathnineimage/9quadri11.GIF, the two points B and D could yield parallelogram BCDA but also parallelogram BQDP (and infinite many more parallelograms).
[Android Apps and Games] dragon005:
So , it can't be done ?
[Android Apps and Games] acadoid:
[MENTION=5637234]dragon005[/MENTION]: No, not for general parallelograms. For instance, one would need fix the angle in the corner of the two control points: 90 degrees would yield a rectangle, smaller than 90 degrees would yield parallelograms such as BQDP in the example, larger than 90 degrees would yield parallelograms such as BCDA in the example.
[Android Apps and Games] dragon005:
Thank you anyway , I have some suggestions for lecturenotes , how can i send it to you , do you have a forum or something for lecturenotes suggestions ?
[Android Apps and Games] acadoid:
[MENTION=5637234]dragon005[/MENTION]: There are several threads concerning LectureNotes, for instance http://xdaforums.com/showthread.php?t=1860868, http://xdaforums.com/showthread.php?t=1870639, or http://xdaforums.com/showthread.php?t=2473844, or drop an email to me.
[Android Apps and Games] acadoid:
[MENTION=5768527]Abudabilibre[/MENTION]: There is a small bug in the preview, the number returned by LN.getScale() is too small by a factor 1/1.5, also the scale of this function is 0 to 1.5 (and not 0 to 1, as claimed on the help page). This will be fixed with the next update tomorrow (Saturday).
[Android Apps and Games] katyacat1:
I am trying to do this grid with a dashed or dotted line instead of the thicker line. I get that the line that needs changed is the "LN.drawLine(0, y, width, y);" and the "LN.drawLine(x, 0, x, height);" ones. But I really don't know any java. So, I dont know what to change it into. Can anyone help or point me to a resource for learning? Many thanks.
[Android Apps and Games] acadoid:
[MENTION=3339143]katyacat1[/MENTION]: You would need to replace the `LN.setStrokeWidth()´ command with a `LN.setDashing()´ command. However, it will not work as intended, as the `LN.drawCheckeredPattern()´ command already draws full lines: Drawing a thick line over a thin lines results in a thick line (the example that you quoted), whereas drawing a dashed line over a full line results in a full line (in difference to what you have in mind).

What you could do is to additionally change the color (`LN.setColor()´). If the pattern color is, let's say, red and you set, let's say, yellow, the result will be a red-yellow-dashed line.
[Android Apps and Games] StampysRevenge:
meeting notes

I took the meeting notes posted by [MENTION=5471513]trabikoenig[/MENTION] and made a few changes. Added auto date and time rounded to 15 mins (thanks Acadoid)

width = LN.getWidth();
height = LN.getHeight();
scale = LN.getScale();
notebook = LN.getName();
page = LN.getPage ();
pages = LN.getNumberOfPages();
LN.setStrokeWidth(scale);
border = 50 * scale;
vert_space = 100 * scale;
half_vert = vert_space / 2;
title_text = 50 * scale;
title_vert = 75 * scale;
text_size = 30 * scale;
text_vert = 35 * scale;
text_hor = 10 * scale;
date = new Date(LN.getCreationDate());
created = date.toLocaleDateString ();

timehour = (date.getHours() > 12 ? date.getHours() - 12 : date.getHours ());
ampm = (date.getHours() > 12 ? "pm" : "am");
timeminute = 15 * Math.floor(date.getMinutes() / 15 + 0.5);
if (timeminute == 60) {
* timeminute = 0;
* timehour++;
* if (timehour == 24) {
* * timehour = 0;
* }
}

time = timehour + ":" + (timeminute < 10 ? "0" : "") + timeminute + " " + ampm;

y = border;

if (page == 1)
{
LN.drawLine(border, border, width - border, border);
LN.drawLine(border, border + vert_space, width - border, border + vert_space);

y += vert_space;

temp_y = y;

for (i = 0; i < 8; i++)
{
LN.drawLine(border, temp_y, width - border, temp_y);
temp_y += half_vert;
}

LN.setAlpha(.25);
LN.drawFilledRect(border, border, width - border, border + vert_space);

temp_y = y;

y += half_vert;

LN.drawFilledRect(border, y, border + vert_space, y + half_vert);
LN.drawFilledRect(width / 2, y, (width / 2) + vert_space, y + half_vert);
y += vert_space;
LN.drawFilledRect(border, y, width - border, y + half_vert);
y += (vert_space) + half_vert;
LN.drawFilledRect(border, y, width - border, y + half_vert);

y = temp_y;

LN.setColor(0, 0, 0);

LN.setTextSize(title_text);
LN.setTextAlign(0);
LN.drawText(notebook, width / 2, border + title_vert);

y += half_vert;
LN.setTextSize(text_size);
LN.setTextAlign(1);
LN.drawText ( 'Date: ' + created , border + text_hor, y + text_vert);

LN.drawText('Time: ' + time, width / 2 + text_hor, y + text_vert);

y += vert_space;

LN.drawText('Attendees:', border + text_hor, y + text_vert);

y += (vert_space) + half_vert;

LN.drawText('Meeting Notes:', border + text_hor, y + text_vert);

y += half_vert;

LN.drawRuledPattern((scale * 0.6), border, y, width - border, height - border, false);
LN.setTextAlign (0);
LN.drawText("Page " + page + " of " + pages , 0.5*width, 0.99*height);
}
else
{
LN.setTextSize(30 * scale );

LN.drawRuledPattern(scale, border, border, width - border, height - border, false);
LN.setTextAlign (0);
LN.drawText("Page " + page + " of " + pages , 0.5*width, 0.99*height);
}
[Android Apps and Games] Igor1201:
Hey guys,

Is it possible to create a pattern that matches the text size with the lines, in a way that the typed word stays exactly over the line?

I tried to code it without sucess, because things are sized differently (px/pt/%).
[Android Apps and Games] acadoid:
[MENTION=2428232]Igor1201[/MENTION]: Since the text can contain letters of different font size, subscript, superscript etc., the baselines of the text are not necessarily equidistant.
[Android Apps and Games] Igor1201:
I see. Anyway, it would be nice to have a default text configuration that follows the ruled line, but I got the point.

Thank you, and excellent app, by the way! :D
[Android Apps and Games] Happy Time:
Vocabulary

width = LN.getWidth();

height = LN.getHeight();

page = LN.getPage();

pages = LN.getNumberOfPages();

step = height / 33;

offset = 0.06 * width;

LN.setStrokeWidth(0.0008 * width);

stepx=(width-2*offset)/20;

LN.setColor(0,0.35,1);

LN.setAlpha(0.5);

/*Ceckmark*/

LN.drawLine(0+offset+2.5*stepx, 0 + step/2+step, 0+offset+2.5*stepx, height-1.5*step);

/*row*/

LN.drawLine(0+offset+3.5*stepx, 0 + step/2+step, 0+offset+3.5*stepx, height-1.5*step );

/*Vocabulary*/

LN.drawLine(0+offset+10*stepx, 0 + step/2+step, 0+offset+10*stepx, height-1.5*step );

/*Pronuncaition*/

LN.drawLine(0+offset+13*stepx, 0 + step/2+step, 0+offset+13*stepx, height-1.5*step );

LN.setAlpha(1);

LN.setColor(0,0.3,0);

LN.setTextSize(0.02 * width);

LN.setTextItalic(true);

LN.setTextFamily(1);

LN.setTextAlign(1);

LN.drawText("Ceckmark" ,0+ offset,0 + 2.25*step);

LN.drawText("Row" ,0+offset+2.5*stepx,0 + 2.25*step);

LN.drawText("Vocabulary" ,0+offset+5*stepx,0 + 2.25*step);

LN.drawText("Pronuncaition" ,0+offset+10*stepx,0 + 2.25*step);

LN.drawText("Translation" ,0+offset+15*stepx,0 + 2.25*step);

LN.drawLine(0+ offset,0 + 2.5*step, width-offset, 0 + 2.5*step);

LN.setColor(0,0,0);

LN.drawRect(0+ offset, 0 +step+ step/2,width- offset,height-1.5*step );

LN.setColor(1,0.65,0);

LN.setAlpha(0.35);

LN.drawFilledRect(0+ offset, 0 +1.5*step,width- offset,0+2.5*step );

r=29*page-28;

s=0 + 3*step / 2+2*step;

for(y = 0 + 3*step / 2+2*step; y <= height-step; y += step){

LN.setColor(0,0,1);

LN.setAlpha(0.5);

LN.drawLine(0+ offset, y, width- offset, y);

LN.setColor(1,0,0);

LN.setAlpha(0.37);

LN.drawOval(0+ offset+2*step/5,y-step/2,step/5,step/5);

LN.drawOval(0+ offset+step,y-step/2,step/5,step/5);

LN.drawOval(0+ offset+step+3*step/5,y-step/2,step/5,step/5);

LN.drawOval(0+ offset+2*step+step/5,y-step/2,step/5,step/5);

if(s<=height-2*step){

LN.setColor(0,0.5,0.1);

LN.setAlpha(0.05);

LN.drawFilledRect(0+ offset, s, width- offset, s+step);

s=s+2*step;

}

/*Row*/

if(r<=29*page){

LN.setAlpha(1);

LN.setColor(0.5,0.5,0.5);

LN.setTextSize(0.02 * width);

LN.setTextItalic(true);

LN.setTextFamily(1);

LN.setTextAlign(0);

LN.drawText(r,0+offset+3*stepx,y-0.25*step);

r+=1;

}

}

LN.setColor(1,0,0);

LN.setTextSize(0.015 * width);

LN.setTextItalic(true);

LN.setTextFamily(1);

LN.setTextAlign(0);

LN.drawText("page "+page + " of "+pages,0.5*width,height-0.5*step);
[Android Apps and Games] Happy Time:
student checklist

width = LN.getWidth();

height = LN.getHeight();

page = LN.getPage();

step = height / 40;

offset = 0.06 * width;

LN.setStrokeWidth(0.0008 * width);

LN.setColor(0,0,0);

LN.drawRect(0+ offset, 0 +step+ step/2,width- offset,height-step /1.75);

LN.drawLine(0+ offset, 0 + 3*step/2+step, width- offset, 0 + 3*step/2+step);

LN.setColor(0,0.8,0.8);

LN.setAlpha(0.34);

LN.drawFilledRect(0+ offset, 0 + step/2+step, width- offset, 0 + 3*step/2+step);

r=1;

for(y = 0 + 3*step / 2+2*step; y < height-7*step; y += step){

LN.setColor(0,0.35,1);

LN.setAlpha(0.5);

LN.drawLine(0+ offset, y, width- offset, y);

if(r<30){

LN.setAlpha(1);

LN.setColor(0.5,0.5,0.5);

LN.setTextSize(0.02 * width);

LN.setTextItalic(true);

LN.setTextFamily(1);

LN.setTextAlign(0);

LN.drawText(r,width-offset-(width-2*offset)/40,y-0.25*step);

r+=1;

if(r>=30){

LN.drawText("30",width-offset-(width-2*offset)/40,0 + 3*step / 2+30*step+0.75*step);

}

}

}

stepx=(width-2*offset)/20;

for(x=0+ offset+stepx;x<14*stepx;x+=stepx){

LN.setColor(0,0.35,1);

LN.setAlpha(0.5);

LN.drawLine(x, 0 + step/2+step, x, height-step /1.75);

}

LN.drawLine(0+ offset+19*stepx, 0 + step/2+step, 0+ offset+19*stepx, height-6*step-3*step / 2 );

LN.drawLine(0+ offset+15.1*stepx, 0 + step/2+step, 0+ offset+15.1*stepx, height-6*step-3*step / 2);

LN.setAlpha(1);

LN.setColor(0,0,0);

LN.setTextSize(0.017 * width);

LN.setTextItalic(true);

LN.setTextFamily(1);

LN.setTextAlign(-1);

LN.drawText("Row" ,0+ offset+20*stepx,0 +2.15* step);

LN.drawText("Name " ,0+ offset+16.8*stepx,0 + 2.15* step);

LN.drawText("Father's Name " ,0+ offset+15*stepx,0 + 2.15* step);

LN.drawText("........................... " ,0+ offset+8*stepx,0 + step);

LN.setColor(0,0,0);

LN.setTextSize(0.03 * width);

LN.setTextAlign(1);

LN.drawText("Class " ,0+ offset+3*stepx,0 + step);
[Android Apps and Games] Happy Time:
notepad

width = LN.getWidth();

height = LN.getHeight();

page = LN.getPage();

step = height / 28;

offset = 0.06 * width;

LN.setStrokeWidth(0.0008 * width);

LN.setColor(0,0,0);

LN.drawLine(0+ offset, 0 + step/2, width- offset, 0 + step/2);

LN.drawLine(0+ offset, 0 + step/2+0.05*step, width- offset, 0 + step/2+0.05*step);

LN.drawLine(0+ 3*offset, height-step / 1.75, width- offset, height-step /1.75);

for(y = 0 + 3*step / 2; y < height-step; y += step) {

LN.setColor(0,0.35,1);

LN.setAlpha(0.5);

LN.setDashing(0.0008 * width,0.002 * width);

LN.drawLine(0+ offset, y, width- offset, y);

}

LN.setAlpha(1);

LN.setColor(0.5,0.5,0.5);

LN.setTextSize(0.02 * width);

LN.setTextItalic(true);

LN.setTextFamily(1);

LN.setTextAlign(1);

LN.drawText("page " + page,0+ offset, height-step / 1.75);
[Android Apps and Games] chilobo:
Template for notes of school lessons

Hello!

This code is for a template I use to take notes of student teachers lessons.

The first page differs from the other pages.

width = LN.getWidth();
height = LN.getHeight();
page = LN.getPage();
scale = LN.getScale ( );
line = 0.05 * width;
t_size = 0.02 * width;
LN.setTextSize(t_size);
dy_Kopf = height * 0.03;

LN.setTextAlign(1);
if (page == 1)
{
y0 = 0.1 * height;
ysc = 0.17 * height;
LN.drawText("LiV", 0.01 * width, y0 * 0.2);
LN.drawText("Datum", 0.01 * width, y0 * 0.5);
LN.drawText("Stunde", 0.01 * width, y0 * 0.8);

LN.drawText("Schule", 0.35 * width, y0 * 0.2);
LN.drawText("Lerngruppe", 0.35 * width, y0 * 0.5);
LN.drawText("Raum", 0.35 * width, y0 * 0.8);

LN.drawText("Mentor", 0.6 * width, y0 * 0.2);
LN.drawText("Besucher", 0.6 * width, y0 * 0.5);

}
else
{
y0 = 0.02 * height;
ysc = 0.07 * height;

}

LN.setStrokeWidth(0.004 * width);
LN.drawLine(0, y0, width, y0);
LN.drawLine(0, y0 + dy_Kopf, width, y0 + dy_Kopf);

LN.setStrokeWidth(0.002 * width);
LN.drawLine(0.002 * width, y0, 0.002 * width, height);
LN.drawLine(1 * line, y0, 1 * line, height);
LN.drawLine(5 * line, y0, 5 * line, height);
LN.drawLine(15 * line, y0, 15 * line, height);
LN.drawLine(0.998*width, y0, 0.998 * width, height);

y1 = y0 + 0.45 * dy_Kopf;
LN.drawText("Zeit", line * 0.15, y1);
LN.drawText("Medien", line * 1.25, y1);
LN.drawText("Interaktion, Prozess", line * 5.25, y1);
LN.drawText("Bemerkungen", line * 15.25, y1);

y1 = y0 + 0.85 * dy_Kopf;
LN.setTextSize(t_size * 0.7);

LN.drawText("T(afel) O(HP) H(eft) E(xp.)", line * 1.25, y1);
LN.drawText("L(ehrer) S(chüler) M(ädchen) J(unge) # (Anz. Meldungen)", line * 5.25, y1);
LN.drawText("D(idaktik) M(ethodik)", line * 15.25, y1);

LN.setStrokeWidth(1);
dy = scale * 120;
yo = y0 + dy_Kopf + 0.004;
anz = Math.floor((height - yo) / dy);
dy = (height - yo) / anz;
for (y=y0 + dy_Kopf ; y < height ; y = y + dy){
LN.drawLine(0, y, width, y);
}

LN.drawText("S. " + page, 0.96 * width, 0.99 * height);
[Android Apps and Games] Tamasaka:
Simple manthly calendar patterns

[MENTION=4619147]acadoid[/MENTION]: Calendars of January and February in the years after next year have some issues.

I suppose the codes at line 12 and 14 in the scripts should evaluate the variable "month2" instead of "month".

When we change lines 12-14

from

if ((month == 2) && (year % 4 == 0) && ((year % 100 != 0) || (year % 400 == 0)))
days++;
if (month <= 2)

to

if ((month2 == 1) && (year % 4 == 0) && ((year % 100 != 0) || (year % 400 == 0)))
days++;
if (month2 <= 1)

it works fine.
[Android Apps and Games] acadoid:
[MENTION=5816619]Tamasaka[/MENTION]: Many thanks for pointing this out to me.

All calendars work fine for all years on the first twelve pages of a notebook. So, if you create a new notebook for the calendar for 2015, the old code will work fine.

However, as you correctly point out, there is a problem if a notebook contains more than twelve pages. I will fix that in the next version.

[EDIT]: I just uploaded v2.6.4 into the app stores in which the calendar custom paper examples are fixed. Many thanks again for pointing this problem out to me.
[Android Apps and Games] viniciuscordeiro:
Hi [MENTION=4619147]acadoid[/MENTION]

I've tried some of those custom patterns but nothing is working here... Even when I try to use templates everything is blank, see in attached picture. How can I solve this?

Thanks

Vinicius Cordeiro
[Android Apps and Games] acadoid:
[MENTION=947116]viniciuscordeiro[/MENTION]: The most likely reasons is that `enforce GPU/hardware rendering´ is enabled in your device's developer settings. Besides slowing down LectureNotes a lot, enabling this option makes custom paper pattern and custom drawing tools cease to work.
[Android Apps and Games] viniciuscordeiro:
[MENTION=4619147]acadoid[/MENTION]

Thank you so much... it's working now!

Is there any way to include a header with a small calendar on right side getting system month?
[Android Apps and Games] acadoid:
[MENTION=947116]viniciuscordeiro[/MENTION]: Yes, this should not be too complicated to achieve. I recommend to start with the code of the calendar and use the current moth instead of the page number for the month to be displayed, then scale everything down and move it to the desired location on the page.
[Android Apps and Games] mmmmario:
date stamps

I understand that the template code is executed everytime a notebook is created and a new page is created. However, is it also executed everytime an already created notebook is opened?

Whithin a single notebook I would like the template to stamp the creation date for each page dependent on the date that the particular page was created. I'm using Date() in the code, and the problem is that when I reopen the notebook the date stamps for previously created pages change to the current reopening date. Any advice? Using creationDate() does not work as all date stamps revert to the date of the firts opening.

Is there a command with which I can read date stamps for each of the previously created pages before reopening the notebook?
[Android Apps and Games] acadoid:
[MENTION=6105638]mmmmario[/MENTION]: If you use

date = new Date();

you will get the date of the code execution, which is when you open the notebook or user activity requires a re-execution of the code. You can use

date = new Date(LN.getCreationDate());

to get the date of the notebook creation or

date = new Date(LN.getPageCreationDate());

to get the date of the page creation.
[Android Apps and Games] Blaqhawk:
These listed below no longer show up in your Google Drive as being shared. Can you post the code again? Thanks in advance.

-Adam
[Android Apps and Games] kemonine96:
Sorry about that, they must have been nuked in a recent cleanup I did. New link: https://nuskunetworks.box.com/s/bybj1chwevfrsztybsq1ubyahnurgx5e

I've also updated the original post with the new URL.
[Android Apps and Games] uitalo:
Is possible include in an template an link for other(s) page(s)?
[Android Apps and Games] acadoid:
[MENTION=6997487]uitalo[/MENTION]: A clickable link? No, that is not possible. You can have clickable links in the text layer, though.
[Android Apps and Games] deightime:
Eisenhower Matrix

I've been meaning to post this Eisenhower Matrix pattern for a while. Hopefully, someone else will find it useful. Also, let me know if there a better place to post this.

width = LN.getWidth();
height = LN.getHeight();
LN.setColor(0, 0, 0);
LN.setStrokeWidth(0.001 * width);
LN.drawLine(0.5 * width, 0, 0.5 * width, height);
LN.drawLine(0, 0.5 * height, width, 0.5 * height);
LN.setColor(0.15, 0, 0, 1);
LN.setTextSize(0.05 * width);
LN.setTextAlign(0);

LN.drawText ("Not", 0.25 * width, 0.70 * height);

LN.drawText ("Urgent", 0.75 * width, 0.70 * height);

LN.drawText ("Important", 0.25 * width, 0.20 * height);

LN.drawText ("Urgent", 0.75 * width, 0.20 * height);
LN.drawText ("Important", 0.75 * width, 0.30 * height);

LN.setTextSize(0.025 * width);
LN.drawText ("but not urgent", 0.25 * width, 0.25 * height);
LN.drawText ("and", 0.75 * width, 0.25 * height);

LN.drawText ("important/urgent", 0.25 * width, 0.75 * height);
LN.drawText ("but not important", 0.75 * width, 0.75 * height);
[Android Apps and Games] Quentinfk:
Does anyone know how to make a grid pattern that's just the corners of the lines? Sort of like a dot grid paper but instead of dots it's plus signs.
[Android Apps and Games] acadoid:
[MENTION=4640740]Quentinfk[/MENTION]: You can use for instance the `double-checkered´ pattern as basis

width = LN.getWidth();
height = LN.getHeight();
scale = LN.getScale();
step = width / 150 + scale * width / 25;
size = step / 10;
for(y = step / 2; y < height; y += step) {
for(x = step / 2; x < width; x += step) {
LN.drawLine(x - size, y, x + size, y);
LN.drawLine(x, y - size, x, y + size);
}
}

Please note that due to the double loop, execution might take too long and get aborted.
[Android Apps and Games] luvatott:
Hi!

I'm wondering if there is someone who could help me get a pattern which is based on the template which is ruled and has a vertical red line on the left but with a modification so that the line is to the right on every second page (to get the margins right when printing both-sided and punching it). Thankful for help!
[Android Apps and Games] acadoid:
[MENTION=7419488]luvatott[/MENTION]: You can get the page number using

page = LN.getPage();

You can test whether the page number is odd or even using

if (page % 2 == 0) {
line = 0.05 * width;
} else {
line = 0.95 * width;
}

If you wish to exchange left and right, exchange `0.05´ with `0.95´.
[Android Apps and Games] luvatott:
Thanks

Thanks! That was just what I needed :)
[Android Apps and Games] _allo_:
Can someone help me with creating a pattern for steno? I do not need much, just like the ruled paper, with every fifth line a bit wider. I tried just to add another grid with 5 times the spacing, but it ends up shifted a bit, where the shift changes with each new 5 lines.

The result should look like this:

http://www.dominique-clarier.com/Dominique_Clarier_-_Stenografie_Ubungsblatt_leer.pdf

(Just the lines are needed)
[Android Apps and Games] acadoid:
[MENTION=6949369]_allo_[/MENTION]: You can take the `double-checkered' example as starting point, which does the same thing for a checkered pattern. Replacing `LN.drawCheckeredPattern()' with `LN.drawRuledPattern()' and removing the thicker vertical lines yields:

width = LN.getWidth();
height = LN.getHeight();
scale = LN.getScale();
LN.drawRuledPattern(scale, false);
LN.setStrokeWidth(0.002 * width);
step = width / 150 + scale * width / 25;
for(y = step / 2; y < height; y += 5 * step) {
LN.drawLine(0, y, width, y);
}
[Android Apps and Games] Christena421:
Thanks for the but really donot know about the topic :) :o :eek:
[Android Apps and Games] _allo_:
Thank you, this works. Needed to replace 5*step by 4*step to get the correct number of lines, the rest is just okay that way :)