Skip to content

Choose X/Y position #172

Answered by JimmyDaddy
asuri0n asked this question in Q&A
Discussion options

You must be logged in to vote

PositionOptions supports those formats

positionOptions: {
 X: 10,
 Y: 10,
}
// or
positionOptions: {
 position: Position.topLeft,
}
// or
positionOptions: {
 X: '10%', // relative to the background image's width
 Y: '10%', // relative to the background image's height
}

You can add texts at first, then add images using relative position(Don't support add multiple different type of things within one call for now).

import Marker from "react-native-image-marker"
···
// add text first
const options = {
  backgroundImage: {
    src: require('./images/test.jpg'),
    scale: 1,
  },
  watermarkTexts: [{
    text: 'text text \n multiple line text',
    positionOptions: {
      X: '10%',
      Y: '…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by JimmyDaddy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #171 on December 05, 2023 09:12.