Given a quasi-projective $X$ variety that is the union of two affines $\text{Spec(A)}$, $\text{Spec(B)}$ with intersection $\text{Spec}(C)$. Let $f\in C$. Then $\text{Spec}(C_f)$ is an open in both of $\text{Spec(A)}$ and $\text{Spec(B)}$. What is the gluing of $\text{Spec(A)}$, $\text{Spec(B)}$ along $\text{Spec}(C_f)$ and its relation to $X$? I can only imagine this object very intuitively and I'm not sure if it is correct or not. It seems to me this is not a separated scheme and it resembles $X$ with double the portion of zeros of $f$ that are in $\text{Spec}(C)$. Specially it seems to me there are two maps from $X$ to this scheme. Is it possibile to make these more clear in case they are true?
Edit: Here are some related questions. Let $\text{Spec}(A)^f$ be the complement of zeros of $f$ that are in $\text{Spec}(C)$. Is it possible to make sense of $\text{Spec}(A)^f$ as a scheme? (explicit description would be ideal). In a way that it admits $\text{Spec}(C_f)$ as an open and gluing $\text{Spec}(A)^f$ and $\text{Spec}(B)$ along $\text{Spec}(C_f)$ is same as gluing $\text{Spec}(A)$ and $\text{Spec}(B)$ along $\text{Spec}(C)$.
Edit2: Let's assume for simplicity that $\text{Spec}(C)=\text{Spec}(A_g)$ for some $g$. Let $f'$ be minimal number of times required to multiply $f$ with $g$ so it is in $A$. Then we can look at $\text{Spec}(A)^f$ as gluing $\text{Spec}(A_{f'})$ and $\text{Spec}(A/gA)$ along $\text{Spec}(A_{f'}/(g))$. This makes sense according to Karl Schwede's article. It is an affine scheme. But with this candidate for $\text{Spec}(A)^f$ I'm not sure whether gluing it to $\text{Spec}(B)$ along $\text{Spec}(C_f)$ gives back $X$. Even more simplistically by gluing $\text{Spec}(C)$ to $\text{Spec}(A)^f$ along $\text{Spec}(C_f)$, does it give back $\text{Spec}(A)$?