新增书籍分享

pull/5/head
fengyuecanzhu 4 years ago
parent 9a135f0590
commit 3be4cf4fa8
  1. BIN
      .idea/caches/build_file_checksums.ser
  2. 4
      app/src/main/java/xyz/fycz/myreader/common/APPCONST.java
  3. 26
      app/src/main/java/xyz/fycz/myreader/widget/page/TxtChar.kt
  4. 23
      app/src/main/java/xyz/fycz/myreader/widget/page/TxtLine.kt

@ -10,10 +10,10 @@ import java.io.File;
public class APPCONST { public class APPCONST {
public static String publicKey = "fyds1.0";//服务端公钥 public static String publicKey = "";//服务端公钥
public static String privateKey;//app私钥 public static String privateKey;//app私钥
public final static String s = "11940364935628058505"; public final static String s = "11940364935628058505";
public static final String KEY = "readerByFengyue"; public static final String KEY = "";
public static final String ALARM_SCHEDULE_MSG = "alarm_schedule_msg"; public static final String ALARM_SCHEDULE_MSG = "alarm_schedule_msg";

@ -0,0 +1,26 @@
package xyz.fycz.myreader.widget.page2
import android.graphics.Point
class TxtChar {
var chardata: Char = ' '//字符数据
var selected: Boolean? = false//当前字符是否被选中
//记录文字的左上右上左下右下四个点坐标
var topLeftPosition: Point? = null//左上
var topRightPosition: Point? = null//右上
var bottomLeftPosition: Point? = null//左下
var bottomRightPosition: Point? = null//右下
var charWidth = 0f//字符宽度
var Index = 0//当前字符位置
override fun toString(): String {
return ("ShowChar [chardata=" + chardata + ", Selected=" + selected + ", TopLeftPosition=" + topLeftPosition
+ ", TopRightPosition=" + topRightPosition + ", BottomLeftPosition=" + bottomLeftPosition
+ ", BottomRightPosition=" + bottomRightPosition + ", charWidth=" + charWidth + ", Index=" + Index
+ "]");
}
}

@ -0,0 +1,23 @@
package xyz.fycz.myreader.widget.page2
class TxtLine {
var charsData: List<TxtChar>? = null
fun getLineData(): String {
var linedata = ""
if (charsData == null) return linedata
charsData?.let {
if (it.isEmpty()) return linedata
for (c in it) {
linedata += c.chardata
}
}
return linedata
}
override fun toString(): String {
return "ShowLine [Linedata=" + getLineData() + "]"
}
}
Loading…
Cancel
Save