Skip to content

Latest commit

 

History

History
132 lines (87 loc) · 3.91 KB

File metadata and controls

132 lines (87 loc) · 3.91 KB

WriteBuddy


📝 Write smarter, smoother: A Compose-based handwriting assistant ✍️
Supports Sticky(PostIt, TextBox, Image), Tool(Laser, Tape)


Kotlin License Kotlin Multiplatform

Platform Platform Platform Platform


Gradle

Add the dependency below to your module's build.gradle file:

Maven Central Version

commonMain.dependencies {
    implementation("io.github.henni99:writebuddy:<latest-version>")
}

Sticky Mode

📌 Post-it 🔤 TextBox 🖼️ Image

How to use

Sticky mode is a feature that allows users to place and manage various sticky items on the screen, such as Post-its, images, and text boxes. Users can add sticky items, move them around, adjust their size, and modify their properties.

val controller = rememberStickyItemController(
    painterImageProperty = PainterImagePropertyExample(),
    vectorImageProperty = VectorImagePropertyExample(),
  )

  LaunchedEffect(Unit) { // For BitmapImage
    controller.updateBitmapImageImageBitmap(
      Res.readBytes("drawable/ic_launcher.webp").decodeToImageBitmap(),
    )
  }


StickyNote(
  modifier = Modifier
    .padding(innerPadding)
    .fillMaxSize(),
  controller = controller,
)

Tool Mode

🔦 Laser 🩹 Tape

How to use

ToolMode provides new functionalities through user touch interactions. Users can enjoy fun note-taking with Laser Mode and Tape Mode. To use Laser and Tape modes, you need to declare a separate controller for each.

val laserPointerController = rememberLaserPointerController()

val progress = animateLaserAlphaFloatAsState(laserPointerController) {
  laserPointerController.clearLaserPaths()
}

val tapeController = rememberTapeController()

var selectedMode by remember { mutableStateOf(ToolMode.LineLaserMode) }


Box(
  modifier = modifier
    .padding(innerPadding)
    .fillMaxSize()
    .useLaserPointerMode(
      laserPointerController,
      progress,
      selectedMode == ToolMode.LineLaserMode,
    )
    .useTapeMode(tapeController, selectedMode == ToolMode.TapeMode),
)


Issue & Enhancement & Contributions

If you find any bugs or have suggestions for better features, please feel free to share your feedback. Contributions are always welcome!


Document

For more details, you can check out the documentations